chantown Posted February 12, 2008 Share Posted February 12, 2008 With "IN" SELECT * FROM users WHERE username IN ('%gal','%saa'); ^^ that doesn't work. But this works: SELECT * FROM users WHERE username LIKE '%gal' OR username LIKE '%saa'; Is there any way I can make it work the first way? Because it saves space + convenicency a lot. thanks! Quote Link to comment https://forums.phpfreaks.com/topic/90779-how-do-i-use-the-sign/ Share on other sites More sharing options...
toplay Posted February 13, 2008 Share Posted February 13, 2008 Is there any way I can make it work the first way? No. "IN" is "IN" and "LIKE" is "LIKE". But if you're worried about forming the "where" clause, just have the different values in an array and then use join/implode (with "OR") to help form the query. Quote Link to comment https://forums.phpfreaks.com/topic/90779-how-do-i-use-the-sign/#findComment-465468 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.