> mysql_select_db("books");
 > $query = "SELECT * FROM books WHERE ".$searchType." LIKE
 > '%".$searchTerm."%'";
 > $result = mysql_query($query);
 >
 > $num_results = mysql_num_rows($result); //This is where I am getting the
 > error actually: "Warning: mysql_num_rows(): supplied argument is not a
valid
 > MySQL result resource in c:\inetpub\wwwroot\php testing\results.php on
line
 > 33"

Try the following after the call to mysql_query() so you can see why $result
is an invalid argument for mysql_num_rows():

echo mysql_error()."<br>\n";




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to