/ Published in: SQL

DISTINCT will produce more results if a user had been added with more than one type of newsletter. The GROUP BY clause will just get the single email.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SELECT DISTINCT(email), newsletter FROM contact_tbl WHERE newsletter != 0; SELECT email, newsletter FROM contact_tbl WHERE newsletter != 0 GROUP BY email;
Comments
