queryRowByIndex

Returns the row number of the row with the given value in a query's index column. Set the index column with the indexName query option.

queryRowByIndex(query, index [, defaultValue]) → returns numeric

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 numeric

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

Examples
Sample code invoking the queryRowByIndex function

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

Fork me on GitHub