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:
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">
|