Jump to content

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resourc


MDanz

Recommended Posts

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";

}

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";

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.