On 7/20/00, Mark Smeets penned:
>Hi everyone,
>
>I'm currently writing a way for myself to email a list of story updates to a
>list of people. (I run a student newspaper website and i want to email the
>story title's and info out to people)
>
>The list of stories and the email list, are in 2 seperate tables.
Since there's really no easy way to relate the email and news tables
and run one query, run two queries:
<CFQUERY DATASOURCE="OtherPress" NAME="getemail">
SELECT emailadress
FROM emails
</CFQUERY>
<CFQUERY DATASOURCE="OtherPress" NAME="news">
SELECT Number, Title, Author, ByLine, Text, PictureFile1, PictureName1,
PictureFile2, PictureName2, Type, EntryDate (change this name)
Alt1, Alt2, Sig1, Sig2, Sig3
FROM Stories
</CFQUERY>
Then send out the e-mails using the getemail query and loop through
the news query for the content.
<CFMAIL QUERY="getemail"
TO="#emailaddress#"
FROM="The Other Press"
SUBJECT="The Other Press Weekly Mailing List">
Welcome to the Other Press Weekly Mailing List, here are this weeks stories:
<cfloop query="news">
#news.Title#
By #news.Author# - #news.ByLine#
________
</cfloop>
</CFMAIL>
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.