Organizational Research By

Surprising Reserch Topic

mysql num rows expects parameter 1 to be resource boolean given in


mysql num rows expects parameter 1 to be resource boolean given in  using -'php'


  Possible Duplicate:
  Warning: mysql_num_rows() expects parameter 1 to be resource,  




I'm new in this forum.
I'm building a search within my site.
I have a problem with the DB. It's giving me this:

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\EasyPHP-5.3.5.0\www\searchscript\search.php on line 86


I'll show you the code section where it gives me such error

line 82: $query = "SELECT * FROM dreams WHERE titolo,titch LIKE \"%$trimmed%\" ORDER BY id_dreams DESC ";
line 85: $numresults=mysql_query($query);
line 86: $numrows=mysql_num_rows($numresults); //error


Now I tried to see what is the problem behind the query and it's telling me this:

SELECT * FROM dreams WHERE titolo, titch LIKE "%tags%" ORDER BY id_dreams DESC


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'titch LIKE "%tags%" ORDER BY id_dreams DESC' at line 1

The code behind this is:

$query = "SELECT * FROM dreams WHERE titolo, titch LIKE \"%$trimmed%\" ORDER BY id_dreams DESC ";
$result = mysql_query($query) or die($query."<br/><br/>".mysql_error());

    
asked Oct 11, 2015 by shegokar.anjeet
0 votes
1 view



Related Hot Questions



Government Jobs Opening


...