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! Link to comment https://forums.phpfreaks.com/topic/12084-multiple-wheres/ 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. Link to comment https://forums.phpfreaks.com/topic/12084-multiple-wheres/#findComment-46018 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\" /] Link to comment https://forums.phpfreaks.com/topic/12084-multiple-wheres/#findComment-46049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.