Users log on and select their class group:
<!--- Select Tutor Group from table in database --->
<tr>
<td valign="top">Tutor Group:</td>
<td colspan="2">
<cfselect size="1" name="TG" required="yes" class="smallform"
message="Please select your tutor group.">
<cfoutput query="GetTg"><option
value="#GetTg.tg#">#GetTg.tg#</option></cfoutput>
</cfselect>
</td>
</tr>
I'd like to use the selected value in a second <cfquery> that uses their
selection as the filter in a where clause. At the moment I have:
<cfset TG ="">
<cfquery name="getName" datasource="sports_qs">
SELECT name, tg
FROM tblNames
WHERE tg = <cfqueryparam value="getTG.tg" cfsqltype="cf_SQL_VARchar">
</cfquery>
I have varied the syntax but either get TG is undefined or the selection boxes
show but no names appear in the list.
I would appreciate the wisdom of anyone who has experience of this.
Many thanks for having a look.
Colin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1402
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54