Question
Cfif function
here is the scenario
query
<cfquery datasource="x" name="get_items">
select items
from product
where rowid = 3
<\cfquery>
In the field items I have (21,26,2005,489,630,632,1296) separeted by comma.
Here is what I want to do:
<cfif form.[variabe] is in(get_items.items)>
color item red
<else>
Color item blue
<\cfif>
I want to pick one item entered via form, from a list of items delimited by comma in the DB
I would like to know if the function IN would work in the cfif tag the way shown above.....
If not what would be the best way to do this job
query
<cfquery datasource="x" name="get_items">
select items
from product
where rowid = 3
<\cfquery>
In the field items I have (21,26,2005,489,630,632,1296) separeted by comma.
Here is what I want to do:
<cfif form.[variabe] is in(get_items.items)>
color item red
<else>
Color item blue
<\cfif>
I want to pick one item entered via form, from a list of items delimited by comma in the DB
I would like to know if the function IN would work in the cfif tag the way shown above.....
If not what would be the best way to do this job