Hi all,
I AM TRYING TO CREATE A SEARCH ENGINE USING PHP AND MYSQL.
I've been hitting the same problem over and over in my development. Sometimes when i do a MySQL query I keep getting the error
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\searchengine\search.php on line 68
I don't understand why. What does this error mean, am I doing something wrong?
I'm using php 5.3, it's definitely not my mysql statement. I'm lost >.<
I even simplify my query code and still the same problem. The general code look something like this:
//echo outconstruct
$constructx = "SELECT * FROM searchengine WHERE $construct";
$construct = "SELECT * FROM searchengine WHERE $construct LIMIT $s,$e";
$run = mysql_query($constructx);
$foundnum = mysql_num_rows($run);
$run_two = mysql_query("$construct");
if ($foundnum==0)
echo "No results found for <b>$search</b>";
else
{