- query:exec()
- query:exec(statement)
SYNOPSIS
DESCRIPTION
The first form executes a SQL statement that has been previously prepared with sql:prepare().
The second form is synonymous with this:
function exec(query, statement)
if (not query:prepare(statement)) then return nil end
return query:exec()
end
When a SELECT statement has executed successfully, the returned data is iterated with sql:next().
RETURN VALUE
On success, returns true. On failure, returns nil. In case of an error,
the error can be retrieved by calling sql:lastError() on the parent database handle.