(PHP 5)

mysqli_stmt::$insert_id -- mysqli_stmt_insert_idGet the ID generated from the previous INSERT operation


Objektorientierter Stil

Prozeduraler Stil

mixed mysqli_stmt_insert_id ( mysqli_stmt $stmt )

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verf├╝gung.

add a note add a note

User Contributed Notes 1 note

hgernhardt at tcnewengland dot org
4 years ago
It should be noted that using mysqli_stmt->insert_id will not result in a unique ID being returned for each execution of a prepared insert statement.  In practice, it appears that the first insertion ID is returned.  If you are performing multiple inserts with the same prepared statement (one invocation of mysqli_stmt::prepare and multiple invocations of mysqli_stmt::execute() for a given statement), and need to keep the unique ID for each insert, use mysqli_connection->insert_id.
To Top