scotchegg78 Posted September 2, 2007 Share Posted September 2, 2007 Hey guys is there a Mysql or statement? example "SELECT * from leads WHERE HolderID = "' . $userid . "' OR AgentID = "' . $userid "'; thanks in advance Quote Link to comment Share on other sites More sharing options...
Barand Posted September 2, 2007 Share Posted September 2, 2007 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 ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.