Thread
:
Emailing a list of commenters from mysql db, no duplicates
View Single Post
08-24-2012, 05:25 PM
PM User
|
#
5
Keleth
Senior Coder
Join Date: Jun 2008
Location: New Jersey
Posts: 2,354
Thanks: 45
Thanked 247 Times in 244 Posts
Code:
SELECT DISTINCT commenter_id FROM comments WHERE post_id=$post_id
Remember that you don't need and shouldn't have quotes around a number, if its being compared to a numeric type.
Keleth
View Public Profile
Find More Posts by Keleth