stmt:nrows

Creates an iterator that returns a table of rows from a SELECT - keyed by name

Prototype

stmt:nrows()

Description

Returns an function that iterates over the names and values of the result set of statement stmt. Each iteration returns a table with the names and values for the current row. This is the prepared statement equivalent of db:nrows().


Note: You should let the iterator finish (that is, get to the end of the selected rows) otherwise the database remains locked. So, do not "break" out of the for loop.

Lua functions

Topics