How did you set up your form on the previous page? What input types were used or recID and for AgeApproved fields?
Jerry Johnson
>>> [EMAIL PROTECTED] 03/09/04 02:25PM >>>
Hey,
I'm not a newbie really, but this is a newb question and I feel like a dolt so I'm posting here.
What I am trying to do is present a list to the user to check of individual records for approval and then have the update happen only once, making the update where neccessary.
I'm only updating one field.
Here's the code I have so far. It's crap! What happens is that every member listed as not approved on the previous form gets approved, whether they are checked off as approved or not. I know I'm missing the obvious here, but I still can't see it.
<cfoutput>
<cfloop list="#form.RecID#" index="RecID">
<cfloop list="#form.AgeApproved#" index="AgeApproved">
<cfquery name="addMember" datasource="#session.datasource#" dbtype="ODBC">
UPDATE tblMembers
<cfif form.AgeApproved IS 1>SET AgeApproved = '1' <cfelse>SET AgeApproved = '0'</cfif>
WHERE RecID = #RecID#
</cfquery>
</cfloop>
</cfloop>
</cfoutput>
TIA,
Guy
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
