Guest User

Untitled

a guest
Jan 20th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. "ALTER TABLE products ADD FULLTEXT alltext (`title`, `cat`, `status`, `description`, `tags`)";
  2.  
  3. $sql="SELECT * FROM products as p INNER JOIN amenities as a ON p.product_id=a.product_id WHERE MATCH(p.title,p.cat,p.status,p.description,p.tags) AGAINST ('$search' )";
  4. mysqli_query($con,$sql);
  5.  
  6. $sql="SELECT * FROM products as p INNER JOIN amenities as a ON p.product_id=a.product_id WHERE MATCH(p.title,p.cat,p.status,p.description,p.tags) AGAINST ('$search' IN BOOLEAN)";
  7.  
  8. $search = mysqli_real_escape_string($con, $_POST['q']);
Add Comment
Please, Sign In to add comment