Well, it looks to me like you're only getting one table worth, because
there's no looping over the query. Try this:
<cfquery name="Get" datasource="trials"> Select * from trials_info
where expiration = '#DateFormat(now()),"mm/dd/yyyy")#'
</cfquery>
<cfoutput query="get">
<cfquery name="Gettrial" datasource="trials"> Select email1 from
#get.name# where exists (Select * from trials_info
where expiration = '#DateFormat(dateAdd(now()),"mm/dd/yyyy")#')
group by email1
</cfquery>
<P><hr>
<cfoutput query="gettrial" group="email1">#get.name# --
#gettrial.email1#<br></cfoutput>
</cfoutput>
BTW, what does the dateAdd(now()) do for you?
-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 28, 2007 1:24 PM
To: CF-Talk
Subject: RE: Only one record
Thanks Randy, however, same result. It only displays the one record
(table) and its emails.
cc_test -- [EMAIL PROTECTED]
cc_test -- [EMAIL PROTECTED]
I need it to display a listing for each record:
cc_test -- [EMAIL PROTECTED]
cc_test -- [EMAIL PROTECTED]
cc_test2 -- [EMAIL PROTECTED]
cc_test2 -- [EMAIL PROTECTED]
-----Original Message-----
From: Adkins, Randy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 28, 2007 12:55 PM
To: CF-Talk
Subject: RE: Only one record
Since you are only doing ONE grouping, that is all you will get in
return:
Try this:
<cfoutput query="gettrial" group="email1">
#name# -- <cfoutput>#email1#</cfoutput> <br>
</cfoutput>
-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 28, 2007 12:49 PM
To: CF-Talk
Subject: Only one record
I have two queries. One gets the trial expiration date for today in the
trials_info dbase.
The other Select takes the trial name (dynamic as #get.name#) and
searches for the trial in the trials datasource and then grabs the email
registrants in this trial and emails them. I use an embedded Select for
the trial.
This works, believe it or not, to the degree that it only displays the
first record on the <cfoutput query="gettrial" group="email1">#name# -
#email#<br></cfoutput> query as:
cc_test -- [EMAIL PROTECTED]
cc_test -- [EMAIL PROTECTED]
I need it to loop through all. The first Select finds the two records. I
tried CFLOPP, but I'm not a proficient CF progrtammer and can only do
this occasionally because of my other "responsibilities".
Any help appreciated...as always. Thanks.
RO
HWW
<cfquery name="Get" datasource="trials"> Select * from trials_info
where expiration = '#DateFormat(now()),"mm/dd/yyyy")#'
</cfquery>
<cfquery name="Gettrial" datasource="trials"> Select email1 from
#get.name# where exists (Select * from trials_info
where expiration = '#DateFormat(dateAdd(now()),"mm/dd/yyyy")#')
group by email1
</cfquery>
<P><hr>
<cfoutput query="gettrial" group="email1">#name# --
#email1#<br></cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274029
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4