The cfoutput inside the cfoutput query=, is not necessary.

This used to throw errors in previous versions, without the exterior having
a group by attribute.

Don't think that is the issue, as others stated the unique pdf name is
probably the root cause.

More just a readability thing.

Byron Mann
Lead Engineer & Architect
HostMySite.com
On Feb 8, 2013 10:34 AM, "Bruce Sorge" <sor...@gmail.com> wrote:

>
> Hey all,
> I have an app that at midnight each day, queries a database and fires of
> an email with a .PDF attachment for a ski voucher. The problem is that each
> person is getting not only their voucher but the others who registered as
> well. Here is what I am doing:
>
> <cfquery datasource="DealsDSN" name="qGetUseremail">
>         SELECT Name, Address_1, Address_2, City, State, Zip, Email,
> BarCode, ACC_Code, BirthDate, Deal_Name, DateRegistered, Time_Registered,
> Confirmation_Number
>     FROM MAH.Users
>     WHERE DateRegistered = '#DateFormat(Yesterday,"mm/dd/yyyy")#' AND
> BarCode IS NOT NULL
> </cfquery>
>
> <cfoutput query = "qGetUserEmail">
>
>  <cfdocument
> name="Voucher"
> format="PDF"
> pagetype="custom"
> pageheight="5"
> pagewidth="6.5"
> margintop="0"
> marginbottom="0"
> marginright="0"
> marginleft="0"
> unit="in"
> fontembed="true"
> backgroundvisible="true"
> localurl="true">
> <cfoutput>
>
>         Voucher formatting goes here
> </cfoutput>
>
> </cfdocument>
> <cfmail from="xxxxx" to="#Email#"  subject="Voucher Barcode" type="html">
>
>         Email message here
>
> <cfmailparam
> file="Voucher.pdf"
> type="application/pdf"
> content="#Voucher#"
> />
>  </cfmail>
> </cfoutput>
>
> When I dump the information I get one row of the users information with X
> number of barcodes. What do I need to do to ensure that the intended
> recipient only receives their barcode? I am sure it's simple but again, I
> have been out of the CF game a while and the obvious is escaping me.
>
> Brue
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354413
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to