Hello and many thanks in advance for any help or advice. I have searched this forum for the topic - and indeed quite a few threads did come up - but they tended to be very specific with regards to toehr variables/jobs etc.
I am having a little trouble with a
$num_results = mysql_num_rows($results);
function.
When i tes this i get the following in my browser:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\program files\apache group\apache\htdocs\phpwork\results.php on line 47
Without wishing to boh you down in the rest of my code or get boring with what i am trying to do, i shall breifly provide a little other php that i am using:
mysql_select_db('books');
$query = "select * from books where ".$searchType." like '%".$searchTerm."%'";
//run the query
$result = mysql_query($query);
//tells me number of rows returned by the query
$num_results = mysql_num_rows($result);
echo '<p>Number of books found: '.$num_results.'</p>';
The above is just to put my error in context if you see what i mean.
I would greatly apprecaite any help, so many thanks.
Thanks again.
Best regards, Bastern 🙂