sqlite3_stmt* sqlite3_next_stmt( sqlite3* db, sqlite3_stmt* stmt );
db
A database connection.
stmt
The previous statement. To get the first statement, pass in a NULL.
A prepared statement pointer. A NULL indicates the end of the list.
This function iterates over the list of prepared statements associated with the given database connection. Passing in a NULL statement pointer will return the first statement. Subsequent statements can be retrieved by passing back the last returned statement value.
If an application is iterating over prepared statements and
finalizing them, remember that the sqlite3_finalize()
function will remove the
statement from the statement list. In such cases, the
application should keep passing in a NULL statement value until
no more statements remain. This technique is not recommended,
however, as it can leave dangling statement pointers.