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! 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. 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 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. 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 Link to comment https://forums.phpfreaks.com/topic/160915-solved-easy-one/#findComment-849270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.