Try using <cfloop query="myquery">

HTH

Jon

John Mentzer wrote:
> 
> Hi
> 
> I'm attempting to embed a table inside a CFMAIL tag. I'd like the table
> to be dynamic. Problem is, whenever I put a <CFOUTPUT QUERY=""> inside
> the <CFMAIL> I get the following error:
> 
> Invalid tag nesting configuration
> 
>  A query driven CFOUTPUT tag is nested inside a CFMAIL tag that also has
> a QUERY= attribute. This is not allowed. Nesting
>  these tags implies that you want to use grouped processing. However,
> only the top-level tag can specify the query that
>  drives the processing.
> 
> Notice there is no Query attribute CFMAIL tag. Why am I getting this
> error? I tried using the Query attribute of the CFMAIL tag, but the mail
> tag was getting looped, sending one email for each of the rows returned.
> That's not quite what I had in mind.
> 
> *Any* help would be *greatly* appreciated!
> 
> * John *
> 
> Here's the CFMAIL tag that's generating the error:
> 
> <CFMAIL FROM="[EMAIL PROTECTED]" TO="#go_print_customer.email#"
> SUBJECT="Thank you for your order" TYPE="HTML">
> 
> <TABLE ALIGN="center" BORDER="0" CELLPADDING="0" CELLSPACING="0"
> WIDTH="430">
>  <TR>
>   <TD>Here is a summary of your order.</TD>
>  </TR>
> 
>  <TR>
>   <TH WIDTH="25">No.</TH>
>   <TH WIDTH="25">Qty</TH>
>   <TH WIDTH="50">Size</TH>
>   <TH WIDTH="50">Price</TH>
>   <TH WIDTH="125">Total</TH>
>   <TH WIDTH="60">&nbsp;</TH>
>  </TR>
> 
>  <CFOUTPUT QUERY="gm_print_lineitems2">
> 
>  <CF_go_exp
>    exp = #gm_print_lineitems2.exp#>
> 
>   <CFLOOP FROM="1" TO="18" INDEX="loopA">
>    <CFIF current_print_choices[loopA][1] IS
> "#gm_print_lineitems2.print_code#">
>     <CFSET current_size = #current_print_choices[loopA][2]#>
>     <CFSET current_price = #current_print_choices[loopA][3]#>
>    </CFIF>
>    <CFSET loopA = 0>
>   </CFLOOP>
> 
>  <TR>
>   <TD ALIGN="right">#gm_print_lineitems2.exp#</TD>
>   <TD ALIGN="right">#gm_print_lineitems2.qty#</TD>
>   <TD ALIGN="right">#current_size#</TD>
>   <TD ALIGN="right">#current_price#</TD>
>   <TD ALIGN="right">&nbsp;</TD>
>  </TR>
> 
>  <TR>
>   <TD ALIGN="center" COLSPAN="6">
>    <HR COLOR="##4582D2" SIZE="1" WIDTH="80%">
>   </TD>
>  </TR>
> 
>  <CFSET subtotal_prints = subtotal_prints + #current_price#>
>  </CFOUTPUT>
> 
>  <TR>
>    <TD>Subtotal, prints</TD>
>    <TD COLSPAN="3">&nbsp;</TD>
>    <TD ALIGN="right">#DollarFormat(subtotal_prints)#</TD>
>  </TR>
> 
>  <TR>
>    <TD>Shipping</TD>
>    <TD COLSPAN="3">&nbsp;</TD>
>    <TD ALIGN="right"> 4.00</TD>
>  </TR>
> 
>  <CFSET total_prints = subtotal_prints + 4>
>  <TR>
>    <TD>Total Order</TD>
>    <TD COLSPAN="3">&nbsp;</TD>
>    <TD ALIGN="right">#DollarFormat(total_prints)#</TD>
>  </TR>
> 
>  <TR>
>   <TD ALIGN="center" COLSPAN="6">
>    <HR COLOR="##4582D2" SIZE="1" WIDTH="80%">
>   </TD>
>  </TR>
> 
> </TABLE>
> 
> </CFMAIL>
> 
> ------------------------------------------------------------------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

-- 
Jon Boehnker
[EMAIL PROTECTED]

-><-
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to