Pete wrote:
 >
 >     <td width="10%"><input <cfif (#staffid# IS NOT
 > "")>checked="checked"</cfif> name="#qGetPracticeAreas.practicearea#"
 > type="checkbox" value='1'></td>
 >

I would actually make the check boxes have the same name, and then just 
work off the list of values that is submitted...
<input<cfif (#staffid# IS NOT "")> checked</cfif> name="pracarealist" 
type="checkbox" value="#qGetPracticeAreas.practicearea#">

 >
 > I am thinking that I should probably put the code above within a
 > <cftransaction> tag.  Then when I do the update I also would update the
 > tbl_staffpracareas table.
 >

The cftransaction is a good idea.

 >
 > I am thinking that once a user presses the Update button that I need to
 > delete all records in the tbl_staffpracareas for a specific staffed and
 > then insert the correct records into the table.
 >

That's the way I would do it...you may be able to do it in a single 
cfquery if you are using SQL Server...something like...

<cfparam name="form.pracarealist" default="">
<cfquery...>
SET NOCOUNT ON
DELETE FROM tbl_staffpracareas WHERE staffid = #form.staffid#
<cfloop index="pa" list="#form.pracarealist#">
INSERT INTO tbl_staffpracareas(practiceid,staffid) 
VALUES(#pa#,#form.staffid#)
</cfloop>
SET NOCOUNT OFF
</cfquery>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261632
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to