scrubbicus Posted August 18, 2009 Share Posted August 18, 2009 I've been trying many different words for this but can't seem to find it. Can help me out if I were looking for something that does not equal a value? There's SELECT * FROM WHERE id = 0 but if I wanted everything but 0, I can't seem to get it. I tried PHP's != and tried to place NOT in a few different positions but keep getting a SQL error. Thanks for your time. Quote Link to comment https://forums.phpfreaks.com/topic/170768-where-clause/ Share on other sites More sharing options...
MadTechie Posted August 18, 2009 Share Posted August 18, 2009 here's a few (I'm pretty sure all are valid) SELECT * FROM WHERE NOT id = 0 SELECT * FROM WHERE id IS NOT 0 SELECT * FROM WHERE ! id = 0 SELECT * FROM WHERE id != 0 SELECT * FROM WHERE ! id <> 0 What's the error ? Quote Link to comment https://forums.phpfreaks.com/topic/170768-where-clause/#findComment-900618 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.