Answered
Using a List within a Where Clause
I'm trying to use a dynamic list within a where clause, not
having much luck and have tried many different ways.
Here is the closest thing I can come up with, the only problem is that the output returns an error due to commas in the where criteria if the list contains more than one item.
Any help would be greatly appreciated!
Select is the name of my comma delimited list.
<cfquery name="list" datasource="#dbnm#">
SELECT *
FROM students
where status = '#x#' and (id = #Listqualify(select,"")#)
</cfquery>
Here is the closest thing I can come up with, the only problem is that the output returns an error due to commas in the where criteria if the list contains more than one item.
Any help would be greatly appreciated!
Select is the name of my comma delimited list.
<cfquery name="list" datasource="#dbnm#">
SELECT *
FROM students
where status = '#x#' and (id = #Listqualify(select,"")#)
</cfquery>
