Woodburn2006 Posted July 6, 2006 Share Posted July 6, 2006 i am trying to get results from a DB where you search for a false condition.for example, if i wanted to search for a 21 year old in my table, i would use: Select from tablename where age='21'but what i want to do is search for everybody who is not 21. so the code would be something like this: SELECT FROM tablename WHERE (age is not equal to)21hard to explain but if anybody has any ideas then please let me knowthanks Link to comment https://forums.phpfreaks.com/topic/13853-mysql-select-query/ Share on other sites More sharing options...
AV1611 Posted July 6, 2006 Share Posted July 6, 2006 where age <> '21'or where age not like '21'or where age != '21'or where age >= '22' AND age <= '20' Link to comment https://forums.phpfreaks.com/topic/13853-mysql-select-query/#findComment-53908 Share on other sites More sharing options...
.josh Posted July 6, 2006 Share Posted July 6, 2006 select * from table where age != 21 Link to comment https://forums.phpfreaks.com/topic/13853-mysql-select-query/#findComment-53910 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.