Since @EdGibbs deleted his answer before I got to say this, he was on the right track with an INSERT ... SELECT;\n\nINSERT INTO queue (email) \n SELECT '
[email protected]' FROM DUAL\n WHERE '
[email protected]' NOT IN (SELECT email from Blacklist);\n\n\nAn SQLfiddle to test with.\n\nYou may want to use PDO or MySQLi instead of the deprecated mysql_* api, or at the very least do mysql_escape_string() on the email addresses before inserting them into the SQL query.",
2013-05-24T17:23:37