It does look similar to that other query, but I've got into a habit (right
or wrong) of not handling any grouping out of my SQL, so probably would have
gone about this a slightly different way.

   But from the top of my head, is it because you're not grouping by email
address? As this ought to be as unique as username, it should work the same
but may be handled by CFMAIL better?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 11 August 2003 17:21
To: [EMAIL PROTECTED]
Subject: Re: [ cf-dev ] what's wrong with this code?



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]
DISCLAIMER: This e-mail is confidential and may also be legally privileged.
If you are not the intended recipient, use of the information contained in
this e-mail (including disclosure, copying or distribution) is prohibited
and may be unlawful.  Please inform the sender and delete the message
immediately from your system.  This e-mail is attributed to the sender and
may not necessarily reflect the views of the Patsystems Group and no member
of the Patsystems Group accepts any liability for any action taken in
reliance on the contents of this e-mail (other than where it has a legal or
regulatory obligation to do so) or for the consequences of any computer
viruses which may have been transmitted by this e-mail. The Patsystems Group
comprises Patsystems plc and its subsidiary group of companies.

-- 
** 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