dimanche 28 juin 2015

Warning: mysqli_num_rows() using MySQL search MATCH AGAINST $keywords [duplicate]

I am testing to get results using a new to me way of searching MySQL using MATCH AGAINST

Here is the code:

<?php
$keyworkds = mysqli_real_escape_string($database,$_POST['keywords']);
$result=mysqli_query($database,"
SELECT * FROM products 
WHERE MATCH (product,manufacturer,model) 
AGAINST ('$keyworkds')");
if(mysqli_num_rows($result)>0){
while($display=mysqli_fetch_assoc($result)){?>

Product:
<?php echo $display['product'] ?>

Manufacturer:
<?php echo $display['manufacturer'] ?>

Model:
<?php echo $display['model'] ?>



<?php }?>   

<?php }else{?> 

there are no results

<?php }?>

The problem is that I get the follow error and I can not see where the problem is. Any idea?

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/local/public_html/

System says the error is on line 89 the funny thing is that line 89 is empty and around it are only divs

Aucun commentaire:

Enregistrer un commentaire