Jump to content

Multiple WHERE's?


xenooreo

Recommended Posts

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 :P

Thanks for your help in advance!
Link to comment
Share on other sites

[!--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 :P

Thanks for your help in advance!
[/quote]

SELECT whatever_columns FROM whatever_table WHERE category='tutorial' AND isFeaturedContent=1

Take 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
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.