Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT WebUsername,
- WebPassword,
- Active,
- Email,
- AddlEmail,
- ShowYear
- FROM Exhibitors e
- WHERE e.Active = '-1'
- AND e.ShowYear = 2013
- AND (e.Email, e.AddlEmail) NOT IN ('[email protected]', '[email protected]')"
- $emails = "'[email protected]', '[email protected]'";
- // example table data for 2 fields in question
- Row | Email | AddlEmail
- 3 | [email protected] | null
- CREATE TABLE `doubleSelect` (
- `Email` varchar(255) DEFAULT NULL,
- `AddlEmail` varchar(255) DEFAULT NULL
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
- INSERT INTO `doubleSelect` (`Email`, `AddlEmail`) VALUES
- ('[email protected]', '[email protected]'),
- ('[email protected]', '[email protected]'),
- ('[email protected]', '[email protected]'),
- ('[email protected]', '[email protected]'),
- (NULL, '[email protected]'),
- ('[email protected]', NULL);
- SELECT *
- FROM `doubleSelect`
- WHERE Email NOT
- IN (
- )
- AND AddlEmail NOT
- IN (
- )
- AND e.Email NOT IN ('[email protected]', '[email protected]')
- AND e.AddlEmail NOT IN ('[email protected]', '[email protected]')
- SELECT *
- FROM `doubleSelect`
- WHERE (Email IS NULL or Email NOT IN ('[email protected]'))
- AND (AddlEmail IS NULL or AddlEmail NOT IN ('[email protected]'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement