MDanz Posted April 17, 2010 Share Posted April 17, 2010 i don't know where i made a mistake? mysql_connect("localhost", "Master", "password"); mysql_select_db("db"); $queryz= mysql_query("SELECT * FROM new WHERE topicid=$number")or die(mysql_error()); $table2 = mysql_num_rows(mysql_query($queryz)); if($table2==0) { $block= "3.jpg"; } else { $block = ".jpg"; } Quote Link to comment https://forums.phpfreaks.com/topic/198814-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result-resourc/ Share on other sites More sharing options...
F1Fan Posted April 17, 2010 Share Posted April 17, 2010 Try this: mysql_connect("localhost", "Master", "password"); mysql_select_db("db"); $queryz= mysql_query("SELECT * FROM new WHERE topicid=$number")or die(mysql_error()); $table2 = mysql_num_rows($queryz); if($table2==0) { $block= "3.jpg"; } else { $block = ".jpg"; } Quote Link to comment https://forums.phpfreaks.com/topic/198814-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result-resourc/#findComment-1043498 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.