dadamssg Posted August 26, 2009 Share Posted August 26, 2009 if i have a column title category. How would i query for multiple categories? i know that this will pull up only 'sports'. SELECT * FROM test WHERE event = 'sports' ORDER BY start ASC LIMIT 5 whats the correct syntax for doing something like this SELECT * FROM test WHERE event = 'sports','performance','random' ORDER BY start ASC LIMIT 5 ?? Quote Link to comment https://forums.phpfreaks.com/topic/172040-solved-dumb-question/ Share on other sites More sharing options...
trq Posted August 27, 2009 Share Posted August 27, 2009 SELECT * FROM test WHERE event IN('sports','performance','random') ORDER BY start ASC LIMIT 5 Quote Link to comment https://forums.phpfreaks.com/topic/172040-solved-dumb-question/#findComment-907242 Share on other sites More sharing options...
dadamssg Posted August 27, 2009 Author Share Posted August 27, 2009 thank you! Quote Link to comment https://forums.phpfreaks.com/topic/172040-solved-dumb-question/#findComment-907302 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.