aescribens
asked on
CFOUTPUT QUERY 1 RECORD AT A TIME
Hello Experts,
I have a query (users) which I need to process one because the process the I have running for each user take about 5 to 10 seconds to process so I need to "step" thru one record at a time, run the process and then move to the next record. I found that doing simple cfloop or cfoutput does work because it runs too quick and doesn't give suffient time for the process to run per user.
Here is what I'm trying but it doesn't work.
Thanks,
Anthony
<cfset CurrentPage=GetFileFromPat h(GetTempl atePath()) >
<cfparam name="PageNum_billing" default="1">
<cfquery name="billing" datasource="rxnotifydb1">
select *
from users
</cfquery>
<cfset MaxRows_billing=1>
<cfset StartRow_billing=Min((Page Num_billin g-1)*MaxRo ws_billing +1,Max(bil ling.Recor dCount,1)) >
<cfset EndRow_billing=Min(StartRo w_billing+ MaxRows_bi lling-1,bi lling.Reco rdCount)>
<cfset TotalPages_billing=Ceiling (billing.R ecordCount /MaxRows_b illing)>
<cfoutput query="billing" startRow="#StartRow_billin g#" maxRows="#MaxRows_billing# ">
#username#
<!--- Process Goes Here, it takes approx 5 to 10 seconds to complete per user --->
<cflocation url="#CurrentPage#?PageNum _billing=# Min(Increm entValue(P ageNum_bil ling),Tota lPages_bil ling)#">
</cfoutput>
I have a query (users) which I need to process one because the process the I have running for each user take about 5 to 10 seconds to process so I need to "step" thru one record at a time, run the process and then move to the next record. I found that doing simple cfloop or cfoutput does work because it runs too quick and doesn't give suffient time for the process to run per user.
Here is what I'm trying but it doesn't work.
Thanks,
Anthony
<cfset CurrentPage=GetFileFromPat
<cfparam name="PageNum_billing" default="1">
<cfquery name="billing" datasource="rxnotifydb1">
select *
from users
</cfquery>
<cfset MaxRows_billing=1>
<cfset StartRow_billing=Min((Page
<cfset EndRow_billing=Min(StartRo
<cfset TotalPages_billing=Ceiling
<cfoutput query="billing" startRow="#StartRow_billin
#username#
<!--- Process Goes Here, it takes approx 5 to 10 seconds to complete per user --->
<cflocation url="#CurrentPage#?PageNum
</cfoutput>
ASKER
No - It's not a CF Process. It's a java process which processes an automated payment; what's why it takes so long.
The cflocation in the cfoutput is meant to go to the next record automatically (at least I was hoping it would). If you href the cflocation URL outside of the cfoutput, you can actually scroll thru all the records manually. But I was hoping it would do this automatically by putting it inside the cfoutput using cflocation.
Thanks,
Anthony
The cflocation in the cfoutput is meant to go to the next record automatically (at least I was hoping it would). If you href the cflocation URL outside of the cfoutput, you can actually scroll thru all the records manually. But I was hoping it would do this automatically by putting it inside the cfoutput using cflocation.
Thanks,
Anthony
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is it a CF process that is taking 10 mins? Also why do you a cflocation inside cfoutput??? I don't understand..
If it is a CF process, your cfoutput should work... cfoutput or cfloop go record at a time..