Home Contents | # sql:newquery | Sql | Core4 Lua Commands

## SYNOPSIS

query = db:newquery()

## DESCRIPTION

A query handle is necessary to perform SQL requests on a database. Multiple query handles may exist on any database connection.

The database handle db itself is usable as a query, too. So, for simple cases, sql:newquery() is not necessary.

## RETURN VALUE

Returns a new query handle.

## SEE ALSO

sql:prepare, sql:bind, sql:exec, sql:next, sql:value, sql:declType, sql:columnCount, sql:columnName, sql:reset, sql:unbind, sql:finish, sql:lastInsertId, sql:rowsAffected