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()); Quote 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? Quote 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? Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.