cleanup, docs
This commit is contained in:
@@ -14,4 +14,11 @@ Returns the last automatically assigned row ID used by the current MySQL connect
|
||||
This is typically used after an `INSERT` into a table with an `AUTO_INCREMENT` primary key.
|
||||
|
||||
:example
|
||||
print("mysql_insert_id is resource-bound; configure the service or connection, then call it in request code.\n");
|
||||
MySQL* db = mysql_connect();
|
||||
if(db != 0)
|
||||
{
|
||||
DValue row = mysql_query(db, "select last_insert_id() as id");
|
||||
print("mysql_insert_id() returns the last AUTO_INCREMENT id for this connection (currently ", mysql_insert_id(db), ")\n");
|
||||
mysql_disconnect(db);
|
||||
}
|
||||
else print("(requires a reachable MySQL server)\n");
|
||||
|
||||
Reference in New Issue
Block a user