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! 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. 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
Archived
This topic is now archived and is closed to further replies.