update teferee set send=1 where journal=1 and (email <>$arrBccEmail[0] and .....);
用not in('var1','var2'...),如下: $emailArr=array('[email protected]','[email protected]');//要排除的email数组 $emailInSql="'".implode("','",$emailArr)."'"; $query="update teferee set send=1 where journal=1 and email not in($emailInSql)"; mysql_query($query);
$emailArr=array('[email protected]','[email protected]');//要排除的email数组
$emailInSql="'".implode("','",$emailArr)."'";
$query="update teferee set send=1 where journal=1 and email not in($emailInSql)";
mysql_query($query);