Getting Started

Tag Reference

Object Reference
asHiddenFields
asURLString
asXML
collectFields
collectFieldsFrom..
copy
dump
empty
erase
loadFromCookie
storeToCookie

Case Study

Download

Mailing List

Other Links

Object::collectFieldsFromQuery

Summary:

This method will copy a row (all columns) from a query into the object. If no row is specified, then it copies all columns from the first row. Useful for initializing an object with data from a database.

Parameters:

Parameter Description Default Required
query A reference to a query object which has already executed.   Yes
row The row number to copy. 1 No

Returns:
Name Value
n/a

Example:
<cfquery name="q_customer" datasource="MyDSN">
   select *
   from customer
   where customer.cus_id = 1
</cfquery>

<cf_cfoInvokeMethod method="aPerson.collectFieldsFromQuery" query="#q_customer#" row="1">











SourceForge.net Logo