Is this related to the problem someone else on the list had not that long
ago, where a CFMail inside a CFOutput thought it had a CFQuery attribute
specified?  Any ideas anyone?


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                                          
                    [EMAIL PROTECTED]                                                  
                                
                    sign.co.uk                         To:     [EMAIL PROTECTED]       
                                
                                                       cc:                             
                                          
                    11/08/2003 15:24                   Subject:     [ cf-dev ] what's 
wrong with this code?                      
                    Please respond to dev                                              
                                          
                                                                                       
                                          
                                                                                       
                                          



Got a query that returns some rows, with the output grouped.  I'm wanting
to construct a mail message inside the cfoutputs.
Basic idea of the code I've got just now, where I'm simply sending the
email without constructing it properly yet:

<cfquery name="queryName">
     SELECT Username, EmailAddress, ItemName
     FROM Users, Items
     WHERE Users.ID = Items.UserID
     ORDER BY Username, ItemName
</cfquery>

<cfoutput query="queryName" group="Username">
     #queryName.EmailAddress#

     <!--- email the user --->
     <cfmail from="me" to="#queryName.EmailAddress#" subject="test">
          blah
     </cfmail>

     <!--- display their items --->
     <cfoutput>
          - #queryName.ItemName#
     </cfoutput>
</cfoutput>


Sample output on the screen is

[EMAIL PROTECTED]
- Fish
- Paste

[EMAIL PROTECTED]
- Monkey
- Mince
- Cheese

How many emails should I get, two?  In this case I'm getting 5.  It only
displays 2 users, but does 5 cfmails.  Am I being particularly dumb or
something?
[CF 4.5]


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to