| Subject: | cfloop list error |
|---|---|
| From: | "Tams87" <webforumsuser@xxxxxxxxxxxxxx> |
| Date: | Fri, 25 Jul 2008 19:55:04 +0000 (UTC) |
| Newsgroups: | macromedia.coldfusion.getting_started |
Hi,
I am trying to loop over a list and get results matching that list however, I
get the following error:
[Macromedia][Oracle JDBC Driver][Oracle]ORA-00904: "1": invalid identifier
The error occurred in E:\ColdFusion8\wwwroot\MidWiferyLottery\test2.cfm: line
11
9 : <cfquery name='test1' datasource='t_test'>
10 : SELECT ID, FIRSTCHOICE FROM TBL_LOTTERY
11 : WHERE FIRSTCHOICE="#i#"
12 : </cfquery>
13 : </cfloop>
I have attached the code I am using.
Thanks in advance.
<cfquery name='test' datasource='t_test'>
SELECT IDS FROM TBL_LOCATION
WHERE IDS in (SELECT firstchoice from TBL_LOTTERY)
</cfquery>
<cfset myList = ValueList(test.ids)>
<cfloop list="#myList#" index="i">
<cfquery name='test1' datasource='t_test'>
SELECT ID, FIRSTCHOICE FROM TBL_LOTTERY
WHERE FIRSTCHOICE="#i#"
</cfquery>
</cfloop>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Question about PDF functionality, EnergyFed |
|---|---|
| Next by Date: | Re: Question about PDF functionality, Kronin555 |
| Previous by Thread: | Question about PDF functionality, EnergyFed |
| Next by Thread: | Re: cfloop list error, Dan Bracuk |
| Indexes: | [Date] [Thread] [Top] [All Lists] |