So heres the relevant part of my switch..
<cfcase value="selectClient">
<cfset XFA.updateClient = "admin.updateClient">
<cfset temp=AddToQ("adminQueries.clientSelect")>
<cfset temp=AddToQ("admin.displayClient")>
</cfcase>
<cfcase value="displayClient">
<cfset XFA.updateClient = "admin.clientInfo">
<cfset AddToQ("home.defaultLayout AS LAYOUT")>
<cfinclude template="dsp_clientSelect.cfm">
</cfcase>
<cfcase value="clientInfo">
<cfset temp=AddToQ("adminQueries.clientInfo")>
<cfset temp=AddToQ("admin.updateClient")>
</cfcase>
<cfcase value="updateClient">
<cfset XFA.updateClientSuccess = "admin.updateClientRecord">
<cfset AddToQ("home.defaultLayout AS LAYOUT")>
<cfinclude template="dsp_updateClient.cfm">
</cfcase>
<cfcase value="updateClientRecord">
<cfset temp=AddToQ("adminQueries.updateClient")>
<cfset temp=AddToQ("admin.updateClientSuccess")>
</cfcase>
<cfcase value="updateClientSuccess">
<cfset XFA.adminSelection = "admin.adminSelection">
<cfset AddToQ("home.defaultLayout AS LAYOUT")>
<cfinclude template="dsp_updateClientSuccess.cfm">
</cfcase>
Select client calls a query
<cfquery name="selectClient" datasource="#request.dsn#">
SELECT *
FROM client
WHERE company_name IS NOT NULL
ORDER BY company_name ASC
</cfquery>
which I output to the dsp_selectClient.cfm file, only displaying the list of clients for the administrator to choose one for editing/updating. From here I use the selected form entry to re-query the same database for JUST this user so as to output their details (as in the clientInfo and updateClient switches). What I am wondering is if there is a way to grab and only output the selected client from the previous query, instead of having to query again (which seems inefficient).
Any ideas? The problem I usually have when trying this is a resulting error telling me I have attempted to call from a query that's no longer available. On that note, I wonder what's the easiest way to save a reasonably large query like this. Is it possible to use a Structure and output a particular client from this perhaps?
TIA
Regards
Mark Henderson
Web Designer
<mailto:[EMAIL PROTECTED]> mailto:[EMAIL PROTECTED]
205 Main Street
PO Box 143, Gore
Southland 9700
Phone: (03) 203 9999
Fax: (03) 203 9900
Notice of Confidential Information: The information contained in this electronic mail is CONFIDENTIAL INFORMATION and may be LEGALLY PRIVILEGED, intended only for the individual or entity named above. If you are not the intended recipient, you are hereby notified that the use, dissemination, distribution, or copying of this document is strictly prohibited. If you have received this electronic message in error, please immediately notify us by return or telephone (0064 3 203 9999) and destroy the original message. Thank you.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

