Jump to content

Can you use OR in the where clause?


dudejma

Recommended Posts

I was just wondering if you could use OR in the where clause. I've never done it before.

 

For example:

$sql = "SELECT * FROM users WHERE status='1' OR status='2' OR status='3' OR status='4'"

 

What it is, I have users where their status is 0 meaning that they're not suspended, but they're just not activated.

 

Thanks guys!

Link to comment
https://forums.phpfreaks.com/topic/243109-can-you-use-or-in-the-where-clause/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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