Something like that, I have a join table like this

mail_queue (user_id, mail_id)

Then just do the select top, loop through the list, cfmail them, followed by
a delete.

I suppose a REALLY BIG mail out might want the user info denormalised into
the queue? But then a REALLY BIG mail out shouldn't be handled by CF

----- Original Message -----
From: "Admin" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, March 06, 2001 8:04 PM
Subject: Re: Mailing Shots in CF


> So how should one write the query to pull 100 messages at the time and set
a
> flag so they would not be selected the next time
>
> select top 100 id,email from sometable where flag is 0
> update sometable set flag = 1 where id in (????)



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to