> Maybe it's just late ...  I'm not quite following how this is working.
> Would you be willing to explain a bit about what's happening overall?
>


whoops.. sorry about that... it was quick and dirty
here ya go.. i'll comment this better:


<! --- look for your flag that you have set in your db and have a mechanism
in your application.cfm that looks for the variable and reloads it into your
application scope if it isnt there... I'll usually assign these types of
flags a 1 or a 0. Then, you can test for the value like so. You'll also want
to check for the session query structure. If you want the cached query to
hang around longer, increase session times in your cfadmin or hold the query
in the application scope   --->

<cfif application.flush_flag OR NOT IsStruct("session.stGetCust")>

<!--- run your query --->
<cfquery datasource="dbfoo" name="qGetCust">
    SELECT id, thisa, thata, theothera
    FROM myusers
</cfquery>

<cfscript>
// start recordset counter
    counter = 1000;
// create your structure
    session.stGetCust=StructNew();
</cfscript>

<cfloop query="qGetCust">
<cfscript>
// add your values to your structure
     "session.stGetCust.int#counter#.id" = qGetCust.id;
     "session.stGetCust.int#counter#.thisa" = qGetCust.thisa;
     "session.stGetCust.int#counter#.thata" = qGetCust.thata;
     "session.stGetCust.int#counter#.theothera" = qGetCust.theothera;
// increase your counter
    counter = counter + 1;
</cfscript>
</cfloop>
<!--- set your flush tag back to 0 and update your db after this --->
<cfset application.flush_flag = 0>
</cfif>

run update query for application.flush_flag and set it back to 0.

Regards,

Phillip B. Holmes


---
[This E-mail has been scanned for viruses.]

----------------------------------------------------------
To post, send email to [EMAIL PROTECTED]
To unsubscribe: 
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: 
   http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to