1
<?php
if(isset($_POST['searchQuery'])) {
    require_once('config.inc.php');
    $search_query=$_POST['searchQuery'];
    $sql = 'SELECT * from sanct where MATCH(Name,State,Catagory) AGAINST(:search_query)';
    $statement = $connection->prepare($sql);
    $statement->bindParam(':search_query', $search_query, PDO::PARAM_STR);
    $statement->execute();
    if($statement->rowCount()) {
        $row_all = $statement->fetchall(PDO::FETCH_ASSOC);
        header('Content-type: application/json');
        echo json_encode($row_all);
    } elseif(!$statement->rowCount()) {
        echo "no rows";
    }
}  
?>
Manoj Sharma
  • 1,467
  • 2
  • 13
  • 20
swa95
  • 23
  • 5
  • 2
    possible duplicate - http://stackoverflow.com/questions/18035795/sql-error-1191-cant-find-fulltext-index-matching-the-column-list or http://stackoverflow.com/questions/9680472/cant-find-fulltext-index-matching-the-column-list-indexes-is-set or http://stackoverflow.com/questions/21693475/1191-cant-find-fulltext-index-matching-the-column-list? – Sean Feb 01 '17 at 04:13

0 Answers0