I have a group of checkboxes that I am converting into a list, but I would like it to where if the person does not check any of the boxes, that it at least puts the value of NULL into the DB. As you can see I have tried <cfparam> but that does not work for lists I suppose.
<cfparam name="attributes.chkOption" default="NULL"> <!---Insert the options into the options table//---> <cfloop list="#attributes.chkOption#" index="j" delimiters=","> <cfquery datasource="#request.site.dsn#" name="insert_options"> DECLARE @maxid int BEGIN SELECT @maxid = MAX(ID) FROM options IF @maxid IS NULL SELECT @maxid = 1 ELSE SELECT @maxid = @maxid + 1 END DECLARE @max_inv_id int BEGIN SELECT @max_inv_id = MAX(ID) FROM inventory END INSERT INTO options ( id, inventory_id, option_id ) VALUES ( @maxid, @max_inv_id, #j# ) </cfquery> </cfloop> Douglas Brown Email: [EMAIL PROTECTED] ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists