Hi everyone,
I am having a problem with retrieving values from the DB when compared with a list of values. I have 8-10 checkboxes
with names populated from the DB.When the user checks a single checkbox , everything is fine.When user checks multiple checkboxes and submits the form the problem starts, in the action page I get the list of checked values thru the form and need to compare it to the names to get their ID's from one table and insert these id's into different table.
My action page is as follows :
<!--- this form variable contains list of checked values--->
<cfparam name="Form.ologies" default="">
<--here is where the problem starts, it is just not retrieving any values from the DB as the form variable contains a list of values with a delimiter "," -->
<CFQUERY name="getid" datasource=#CONST_DB_NAME# dbtype=#CONST_DB_TYPE#>
SELECT name_id FROM ologies
WHERE name IN ('#Form.ologies#')
</CFQUERY>
<CFQUERY name="updateProf" datasource=#CONST_DB_NAME# dbtype=#CONST_DB_TYPE#>
UPDATE memprofiledata
SET name_id_ref = #getid.name_id#
WHERE mem_id_ref = #session.memID#
</CFQUERY>
Any help will be appreciated.
Thanks,
Jane.