Oracle 5.0 Reference Manual page 2409

Table of Contents

Advertisement

Procedural style
mysqli mysqli_init();
Allocates or initializes a MYSQL object suitable for
Return Values
Returns an object.
Examples
See mysqli_real_connect.
See Also
mysqli_options
mysqli_close
mysqli_real_connect
mysqli_connect
20.7.3.9.30. mysqli::$insert_id,
Copyright 1997-2012 the PHP Documentation Group. [2230]
mysqli::$insert_id
mysqli_insert_id
Returns the auto generated id used in the last query
Description
Object oriented style
mixed
mysqli->insert_id ;
Procedural style
mixed mysqli_insert_id(
mysqli link);
The
mysqli_insert_id
having the AUTO_INCREMENT attribute. If the last query wasn't an INSERT or UPDATE statement or
if the modified table does not have a column with the AUTO_INCREMENT attribute, this function will
return zero.
Parameters
link
MySQL Improved Extension (Mysqli)
Note
Any subsequent calls to any mysqli function (except mysqli_options) will fail
until
mysqli_real_connect
mysqli_insert_id
function returns the ID generated by a query on a table with a column
Note
Performing an INSERT or UPDATE statement using the LAST_INSERT_ID()
function will also modify the value returned by the
function.
Procedural style only: A link identifier returned by
mysqli_connect
mysqli_options
was called.
or
mysqli_init
2389
and mysqli_real_connect.
mysqli_insert_id

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents