db:changes

Returns number of changes by the most recent SQL statement

Prototype

db:changes()

Description

This function returns the number of database rows that were changed (or inserted or deleted) by the most recent SQL statement. Only changes that are directly specified by INSERT, UPDATE, or DELETE statements are counted. Auxiliary changes caused by triggers are not counted. Use db:total_changes() to find the total number of changes.

Lua functions

Topics