Comparing values in db against values in form
Hi,
This should be straight forward, but I'm missing something.
I have a query. I need to compare the value of each record to the value in a form field.
<cfquery name="getInfo" datasource="#dsn#">
SELECT id, text
FROM table
WHERE (id= 102)
</cfquery>
There could be 10 items in the table, but what I'm doing (below), displays only the last item in the table. Any suggestion would be greatly appreciated!
When I do this, I get the last record in the table.
<cfif #(getInfo.text)# EQ "Reception">
<input type="Checkbox" name="session_text" value="Reception" checked>Reception
<cfelse>
<input type="Checkbox" name="session_text" value="Reception">Reception
</cfif>
