I often forget the exact syntax of things like this… So here’s an example…
$query1 = 'SELECT * FROM `'.$dbName.'`.`users` WHERE email NOT IN (SELECT email FROM `'.$setupDBName.'`.`users`)';
From Mark Jackson
Also the ‘IN’ and ‘NOT IN’ can be used to specify multiple conditional values – for example:
SELECT * FROM users WHERE email IN (‘[email protected]’,'[email protected]’,'[email protected]’,'[email protected]’);
Saves a bit of time writing it out in full with loads of email = ‘…’ OR email = ‘…’
Main Category
Secondary Categories