<?php 
require('../config/dbcon.php');
if(isset($_POST['search'])){
    $search = $_POST['search'];
	$query = "select table_name, engine from information_schema.tables where table_type = 'BASE TABLE' AND table_schema='venkatco_db' and Lower(table_name) LIKE Lower('%".$search."%')";
    $result = mysqli_query($connect,$query);
    while($row = mysqli_fetch_array($result) ){
        $response[] = array("label"=>$row['table_name']);
    }
    echo json_encode($response);
}
exit;
?>