conan318 Posted October 11, 2011 Share Posted October 11, 2011 i need to pull the records from where status not = rejected does anyone know the correct syntax? $data=mysql_query("SELECT * FROM design WHERE id='$id' AND status!='rejected' ") or die (mysql_error()); Link to comment https://forums.phpfreaks.com/topic/248878-select-from-table-where-status-rejected/ Share on other sites More sharing options...
Buddski Posted October 11, 2011 Share Posted October 11, 2011 Are you getting an error? Link to comment https://forums.phpfreaks.com/topic/248878-select-from-table-where-status-rejected/#findComment-1278075 Share on other sites More sharing options...
conan318 Posted October 11, 2011 Author Share Posted October 11, 2011 no error but not displaying the image it should... is that correct syntax for != in the where clause? Link to comment https://forums.phpfreaks.com/topic/248878-select-from-table-where-status-rejected/#findComment-1278076 Share on other sites More sharing options...
Buddski Posted October 11, 2011 Share Posted October 11, 2011 If you want NOT EQUAL, then yes. Check your $id variable and the CASE of status, you may have a capital or something. Always check that the values you are entering are the ones you are expecting Link to comment https://forums.phpfreaks.com/topic/248878-select-from-table-where-status-rejected/#findComment-1278083 Share on other sites More sharing options...
conan318 Posted October 11, 2011 Author Share Posted October 11, 2011 no probs thanks for your help... i will keep testing ill find the problem Link to comment https://forums.phpfreaks.com/topic/248878-select-from-table-where-status-rejected/#findComment-1278093 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.