Here is the error:
Attribute validation error for tag cfloop. The value of the attribute query, which is currently "qStockItems", is invalid. The Error Occurred in C:\CFusionMX\wwwroot\stock3.cfm: line 21
19 :
20 : <!--- loop over the query from the cfhttp feed. --->
21 : <cfloop query="qStockItems">
Here is the code:
<!--- get all the symbols from the database --->
<cfquery name="qGetSymbols" datasource="stocks">
SELECT sym
FROM symbols
WHERE exchg ='NYSE'
</cfquery>
<!--- get a list of all the symbols --->
<cfset lStockSymbols = valueList( qGetSymbols.sym )/>
<cfoutput>#lStockSymbols#</cfoutput><br>
<!--- get the symbols from the yahoo feed --->
<cfhttp url=""> method="GET"
name="qStockItems"
columns="Symbol,Change,LastTradedPrice"
textqualifier=""
delimiter=","
firstrowasheaders="no">
<!--- loop over the query from the cfhttp feed. --->
<cfloop query="qStockItems">
<!--- and if the last traded price of this row isnt zero --->
<CFIF qStockItems.LastTradedPrice NEQ 0.00>
<!--- insert this row into the database --->
<cfquery name="qInsertStock" datasource="stocks">
INSERT INTO stocks
(Symbol,Change)
VALUES
('#qStockItems.Symbol#','#qStockItems.Change#')
</cfquery>
</CFIF>
</cfloop>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

