Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IN Query Problem

Status
Not open for further replies.

menu

Technical User
Apr 25, 2001
24
AE
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=&quot;Form.ologies&quot; default=&quot;&quot;>
<--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 &quot;,&quot; -->
<CFQUERY name=&quot;getid&quot; datasource=#CONST_DB_NAME# dbtype=#CONST_DB_TYPE#>
SELECT name_id FROM ologies
WHERE name IN ('#Form.ologies#')
</CFQUERY>

<CFQUERY name=&quot;updateProf&quot; datasource=#CONST_DB_NAME# dbtype=#CONST_DB_TYPE#>
UPDATE memprofiledata
SET name_id_ref = #getid.name_id#
WHERE mem_id_ref = #session.memID#
</CFQUERY>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top