Jump to content

multiple WHERE in mySQL


wwfc_barmy_army

Recommended Posts

Hello,

 

I just thought i'd check but i can't seem to find any information anywhere,

 

Can you replace a query like this:

SELECT * FROM tablename WHERE name = "name" OR name = "name2" OR name = "name3"

 

with something like;

SELECT * FROM tablename WHERE name = "name", "name2", "name3"

 

or some shorthand way of having multiple where conditions on the same column?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/236949-multiple-where-in-mysql/
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.