Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- userID,
- userEmail,
- userNewsletter,
- userSMSRefill
- FROM
- users
- WHERE userID IN (
- SELECT
- userID
- FROM
- alertcontacts
- WHERE
- alertContactType IN (8,14)
- AND alertContactStatus = 2
- GROUP BY
- userID
- ORDER BY
- userID)
- AND (userSMSRefill = 0 OR userSMSRefill IS NULL)
- ORDER BY
- userNewsletter,
- userSMSRefill
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement