ivytony Posted March 2, 2008 Share Posted March 2, 2008 This is my SQL: "SELECT count(*) FROM links where `link_title` = '$link->title' and `link_field` = '$link->author' and `link_status` != 'discarded'" I want to filter out the entries labeled with 'discarded' in the link_status column. Right now, `link_status` != 'discarded' doesn't really work for me. I am wondering how to filter out the discarded-labeled entries. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/94068-how-to-select-by-not/ Share on other sites More sharing options...
448191 Posted March 2, 2008 Share Posted March 2, 2008 "NOT" or "<>" Quote Link to comment https://forums.phpfreaks.com/topic/94068-how-to-select-by-not/#findComment-481888 Share on other sites More sharing options...
ivytony Posted March 2, 2008 Author Share Posted March 2, 2008 thanks. Is this correct? `link_status` <> 'discarded'" `link_status` NOT 'discarded'" thanks! Quote Link to comment https://forums.phpfreaks.com/topic/94068-how-to-select-by-not/#findComment-481897 Share on other sites More sharing options...
fenway Posted March 4, 2008 Share Posted March 4, 2008 `link_status` <> 'discarded'" Yes, that fine... otherwise you'd need `link_status` NOT IN ( 'discarded' ) Quote Link to comment https://forums.phpfreaks.com/topic/94068-how-to-select-by-not/#findComment-483261 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.