Jump to content

PHP:Database issue


Cenron

Recommended Posts

I dont know why but everytime I run this command via mysql_query()

 

$sql = "SELECT `menu_id`,`module_id` 
		FROM `module_menu`
		WHERE `menu_id`=0 OR (`menu_id`='1' AND `module_id`='7')";

 

then I call mysql_num_rows();

 

if(!mysql_num_rows($result)) { continue; }

 

Without the `menu_id`=0 it works perfectly but when i put that  `menu_id`=0 OR mysql_num_rows() always returns a true. I DONT KNOW WHY there is only one field in the database that the menu_id=0 so MAX it should return 2 rows but most of the time it should return 0. Any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.