Hi, Sunday, September 23, 2001, 3:25:02 PM, you wrote: NV> I am new to php and that the folowing error: Warning: mysql_num_rows(): NV> supplied argument is not a valid MySQL result resource in NV> /home/tbonestu/public_html/smallimages.php
NV> i dont know what i am doing wrong here is the code: NV> @ $db = mysql_pconnect(connect info); NV> mysql_select_db("images"); NV> $query = "select * from images where type =".$type.""; NV> $result = mysql_query($query); NV> $num_results = mysql_num_rows($result); Do it this way $query = "select * from images where type = '$type'"; or if you prefer $query = "select * from images where type = '".$type."'"; PS check your comps date its a year out -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php