dadamssg Posted June 4, 2009 Share Posted June 4, 2009 i have events stored and they all have categories attached to them...how do i turn this query into the same thing, but NOT including the category 'Surrounding'? SELECT * FROM `test` WHERE end >= NOW() ORDER BY start ASC the column is named Category and i want to pull up all categories EXCEPT the 'Surrounding' category...i'm just unsure how to do this...thanks! Quote Link to comment https://forums.phpfreaks.com/topic/160915-solved-easy-one/ Share on other sites More sharing options...
Ken2k7 Posted June 4, 2009 Share Posted June 4, 2009 In the WHERE clause, add in the case for where Category doesn't equal Surrounding. Quote Link to comment https://forums.phpfreaks.com/topic/160915-solved-easy-one/#findComment-849244 Share on other sites More sharing options...
dadamssg Posted June 4, 2009 Author Share Posted June 4, 2009 != <---like that? i know thats how you do it in php..not so sure for sql Quote Link to comment https://forums.phpfreaks.com/topic/160915-solved-easy-one/#findComment-849254 Share on other sites More sharing options...
Ken2k7 Posted June 4, 2009 Share Posted June 4, 2009 You could always just test it out instead of posting it here. There's no harm in using SELECTs. It's not like UPDATE or DELETE or TRUNCATE that actually causes problems. So test it out. P.S.: yes, you can use that. Quote Link to comment https://forums.phpfreaks.com/topic/160915-solved-easy-one/#findComment-849265 Share on other sites More sharing options...
dadamssg Posted June 4, 2009 Author Share Posted June 4, 2009 haha...you're right..thanks Quote Link to comment https://forums.phpfreaks.com/topic/160915-solved-easy-one/#findComment-849270 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.