Jump to content

Is there a MySQL Or Statement?


scotchegg78

Recommended Posts

Yes, that's fine.

 

Another version, replacing a string of OR statement like this

 

... WHERE (a=1) OR (a=2) OR (a=3)

 

is

 

... WHERE a IN (1,2,3)

 

 

So your query could be written as

 

SELECT * from leads WHERE '$userid' IN (HolderID, AgentID )

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.