Hi guys,
I have the following error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fhlinux245/h/blah.co.uk/user/htdocs/suppliersearch.php on line 55
from the following part of that code:
// Build SQL Query
$query = "select * from 'suppliers' where 'county' like \"%$trimmed%\"
order by county"; // EDIT HERE and specify your table and field names for the SQL query
$numresults=mysql_query($query);
$numrows=mysql_num_rows($numresults);
if ($numrows == 0)
{
echo "<h4>Results</h4>";
echo "<p>Sorry, your search: "" . $trimmed . "" returned zero results</p>";
}
// next determine if s has been passed to script, if not use 0
if (empty($s)) {
$s=0;
}
// get results
// line 60
$query .= " limit $s,$limit";
$result = mysql_query($query) or die("Couldn't execute query");
To me it looks like mysql_num_rows should be replaced with something else as it may be old?
Any help appreciated.
Thanks,
G