Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Statement Exclude

Status
Not open for further replies.

digatle

Technical User
Oct 31, 2003
85
US
I need to modify my SQL query (seen below) to exclude result. What I need to exclude is

WHERE `category_id`=\"90".$dept."\"

How do I add a statement to exclude this information?

$menubardep = mysql_query( "SELECT `category_id`, `url`, `description` FROM `spidernet_menubar` WHERE `category_id`=".$blog_id." " );

Digatle
 
Sorry if I posted this to the wrong forum. I'm using PHP and didn't know where to post this.

Digatle
 
Would this not work? : (Sorry, minimal php experience)

$menubardep = mysql_query( &quot;SELECT `category_id`, `url`, `description` FROM `spidernet_menubar` WHERE `category_id`=&quot;.$blog_id.&quot; &quot; AND `category_id` <> \&quot;90&quot;.$dept.&quot;\&quot;
);


&quot;If you always do what you've always done, you will always be where you've always been.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top