code:
<?php
session_start;
include('config.php');
$student_id = $_SESSION['student_id'];
$searchTerm = $_GET['term'];
$query = "SELECT company_name FROM company WHERE company LIKE '%".$searchTerm."%' ORDER BY company_name ASC";
$query .= "SELECT key_skills FROM skill_master WHERE key_skills LIKE '%".$searchTerm."%' ORDER BY key_skills ASC";
$result = mysqli_multi_query($con,$query);
while($row = mysqli_fetch_assoc($result))
{
$data[] = $row['company_name'];
$data[] = $row['key_skills'];
}
echo json_encode($data);
?>
I am using autocomplete suggestion box when I use single query in the above code it work perfectly and show me result but now I want to run two query to get different data in a single autocomplete box but when I run this file it show me "null" output. So, How can I fix and get two different table data in single box ?Please help me.
Thank You