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 Quote 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' Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/13853-mysql-select-query/#findComment-53910 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.