crmamx Posted February 16, 2011 Share Posted February 16, 2011 I cannot find the right combination to include more than one exclusion from the SELECT, that is more than one WHERE !=. $result = mysql_query("SELECT * FROM members WHERE last !='neville' Order By last") or die(mysql_error()); if (!$result) { die("Query to show fields from table failed"); } Link to comment https://forums.phpfreaks.com/topic/227889-more-than-one-exclusion-from-the-select-statement/ Share on other sites More sharing options...
AbraCadaver Posted February 16, 2011 Share Posted February 16, 2011 AND? SELECT * FROM members WHERE last !='neville' AND last != 'chamberlain' ORDER BY last Link to comment https://forums.phpfreaks.com/topic/227889-more-than-one-exclusion-from-the-select-statement/#findComment-1175088 Share on other sites More sharing options...
gristoi Posted February 16, 2011 Share Posted February 16, 2011 You need to use AND or OR in your statement. Example: SELECT a, b WHERE a !='b' AND b!= something Link to comment https://forums.phpfreaks.com/topic/227889-more-than-one-exclusion-from-the-select-statement/#findComment-1175089 Share on other sites More sharing options...
crmamx Posted February 16, 2011 Author Share Posted February 16, 2011 Many thanks. I was trying to find an operand like & or something. Link to comment https://forums.phpfreaks.com/topic/227889-more-than-one-exclusion-from-the-select-statement/#findComment-1175120 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.