xenooreo Posted June 15, 2006 Share Posted June 15, 2006 Hey, is it possible to somehow use multiple WHERE's in a SELECT query?I'm working on a photoshop site, and I need the results to be something like WHERE `category` = 'tutorial' and WHERE `isFeaturedContent` = '1'However, I'm having difficulty getting it to do both :PThanks for your help in advance! Quote Link to comment Share on other sites More sharing options...
Wildbug Posted June 15, 2006 Share Posted June 15, 2006 [!--quoteo(post=384291:date=Jun 15 2006, 01:33 PM:name=xenooreo)--][div class=\'quotetop\']QUOTE(xenooreo @ Jun 15 2006, 01:33 PM) [snapback]384291[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hey, is it possible to somehow use multiple WHERE's in a SELECT query?I'm working on a photoshop site, and I need the results to be something like WHERE `category` = 'tutorial' and WHERE `isFeaturedContent` = '1'However, I'm having difficulty getting it to do both :PThanks for your help in advance![/quote]SELECT whatever_columns FROM whatever_table WHERE category='tutorial' AND isFeaturedContent=1Take a look at some of the examples in the MySQL manual for the simpler stuff. I think there's a tutorial there. Quote Link to comment Share on other sites More sharing options...
xenooreo Posted June 15, 2006 Author Share Posted June 15, 2006 Thanks, works great. Just wasn't quite sure how I would connect 2 of them. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Quote Link to comment 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.