Page 1 of 1

While question

Posted: Fri May 04, 2007 7:52 pm
by pinehead18
I wrote a script that sends an email to everyone that is checked with a check box.

How might i code the sql stuff to see find everyone's email in the db that has a check in the check box, then send them each a copy of the email?

Thanks
ANthony

Posted: Fri May 04, 2007 10:10 pm
by Christopher
You could loop through the post var and do a query for each, or build a single statement using OR.

Posted: Fri May 04, 2007 10:11 pm
by pinehead18
Well i'm curious how to handle the mysql select statement.

Selete email from users where id = each username?
see what i mean?

Posted: Fri May 04, 2007 10:14 pm
by John Cartwright
if you have an array of ids you want to fetch, implode() in conjunction with mysql IN() function

Posted: Sat May 05, 2007 8:42 am
by pinehead18
Aaaaa i was afraid i was going to have to pull out array's.

BOOOOO