pouncer Posted April 13, 2007 Share Posted April 13, 2007 select * from items where group != "" how do i use != in sql? im trying to get the items where the 'group' field is not null Quote Link to comment Share on other sites More sharing options...
per1os Posted April 13, 2007 Share Posted April 13, 2007 $sql = "SELECT * FROM items WHERE group <> ''"; Try that. Quote Link to comment Share on other sites More sharing options...
pouncer Posted April 13, 2007 Author Share Posted April 13, 2007 awesome, thanks. Quote Link to comment Share on other sites More sharing options...
per1os Posted April 13, 2007 Share Posted April 13, 2007 And just a side note, if you are checking against null values you would need this: $sql = "SELECT * FROM items WHERE group IS NOT NULL"; Just a side note. Quote Link to comment 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.