While question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

While question

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You could loop through the post var and do a query for each, or build a single statement using OR.
(#10850)
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post 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?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

if you have an array of ids you want to fetch, implode() in conjunction with mysql IN() function
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Aaaaa i was afraid i was going to have to pull out array's.

BOOOOO
Post Reply