Question
Help with CFMAIL QUERY?
Greetings
On my final leg of getting a notification system up and running, I have run into lookup table/junction table discombobulation.
I want a notification message to go out to only those who match a code.
The codes reside in the lookup_code table, the email addresses reside in the lookup_contact table, the main vendors table is related to both the contacts and junction_vendor_code tables via FK's.
The body of the email must pull information from the main bid table for the descriptions:
<p>The following Bid Package has been posted:</p>
<p>#ReferenceNumber#, #Title#, #Description#</p>
etc.
<cfquery name="list_sendto" datasource="#Request.BaseDSN#">
SELECT vendors.vendor_ID, lookup_contact.vendor_ID, contact_email, ReferenceNumber,Title,Description
FROM vendors, lookup_contact, junction_vendor_code, bid
WHERE ???
</cfquery>
<cfmail query="list_sendto"
to="#list_sendto.contact_email#"
etc.
The first mail was supposed to go to one vendor contact, but went out the the whole list of vendor contacts twice.
Thanks for any help and happy Thanksgiving...
newportri
On my final leg of getting a notification system up and running, I have run into lookup table/junction table discombobulation.
I want a notification message to go out to only those who match a code.
The codes reside in the lookup_code table, the email addresses reside in the lookup_contact table, the main vendors table is related to both the contacts and junction_vendor_code tables via FK's.
The body of the email must pull information from the main bid table for the descriptions:
<p>The following Bid Package has been posted:</p>
<p>#ReferenceNumber#, #Title#, #Description#</p>
etc.
<cfquery name="list_sendto" datasource="#Request.BaseDSN#">
SELECT vendors.vendor_ID, lookup_contact.vendor_ID, contact_email, ReferenceNumber,Title,Description
FROM vendors, lookup_contact, junction_vendor_code, bid
WHERE ???
</cfquery>
<cfmail query="list_sendto"
to="#list_sendto.contact_email#"
etc.
The first mail was supposed to go to one vendor contact, but went out the the whole list of vendor contacts twice.
Thanks for any help and happy Thanksgiving...
newportri
