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`)';
Related posts:

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`)';
Related posts:
This post has had 14 views
Also the ‘IN’ and ‘NOT IN’ can be used to specify multiple conditional values – for example:
SELECT * FROM users WHERE email IN (‘me@me.com’,'you@you.com’,'him@him.com’,'her@her.com’);
Saves a bit of time writing it out in full with loads of email = ‘…’ OR email = ‘…’