queryRowDataByIndex

Returns the row with the given value in a query's index column, as a struct. Set the index column with the indexName query option.

queryRowDataByIndex(query, index [, defaultValue]) → returns struct

This function requires Lucee 5.3.4.34 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

query query
Required

The query.

index string
Required

The index value of the row.

defaultValue struct

Returned when no row matches. When omitted, an error is thrown.

Examples
Sample code invoking the queryRowDataByIndex function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub