home Links Articles Books Past Meetings Photos SiteMap
The MDCFUG is sponsored by TeraTech. Visit us at www.TeraTech.com

Please send
comments/questions to

michael@
teratech.com

 
Nested Query Loop Example

Nested Query Loop Example

    <CFQUERY NAME="GetEmail"   DATASOURCE="Library">

       SELECT Email , SecurityLevel  FROM Customer

    </CFQUERY>

    <CFLOOP QUERY="GetEmail">

       <CFQUERY NAME="GetText" DATASOURCE="Library">

          SELECT EmailText, EmailSubject FROM Messages

          WHERE  SecurityLevel = #GetEmail.SecurityLevel#

       </CFQUERY>

        <CFMAIL QUERY="GetText"

          TO="#GetEmail.Email#"

          FROM="info@mycompany.com"

          SUBJECT="#GetText.EmailSubject#"

          SERVER="smtp.mycompany.com">#GetText.EmailText#

       </CFMAIL>

    </CFLOOP>

Previous slide Next slide Back to first slide View graphic version


Home | Links | Articles | Past Meetings | Meeting Photos | Site Map
About MDCFUG | Join | Mailing List |Forums | Directions |Suggestions | Quotes | Newbie Tips
TOP

Copyright © 1997-2017, Maryland Cold Fusion User Group. All rights reserved.
< >