> When I used to work with ASP, I would run my SQL > statement, check to see if the recordset is empty > or not, if it wasn't, I'd roll it up into an array, > and the loop through the array. > > I know how to do the SQL statement, and how to loop > through it, but how would I check to see if the > result of the query contained results or not, and > how would I put the results in an array, and then > how would I loop through that array?
You can look at the RecordCount variable within the query object to see if your recordset has any records in it: <cfif qMyQuery.RecordCount> ... you've got records ... <cfelse> ... no records found! ... </cfif> As for putting the results in an array, you can certainly do that, but why bother? You can just loop over the recordset itself as necessary. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4