Lucee Function Reference

querytostruct()

Copy the query columns data to struct by using the columnKey argument

Example

querytostruct(query query,string columnKey,[string structType,[boolean valueRowNumber]]):struct

Category

query,struct

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
query query  Yes   A query to copy to a struct  
columnKey string  Yes   Column name that values are used for struct key  
structType string  No ordered default:ordered, Struct type to created  
valueRowNumber boolean  No   default: false, the boolean value that indicates the struct values return as column data or row number