Thank you for visiting this site. If you are looking for web hosting
services, you have come to the right place. Please search my database of
over 2400
hosting companies.
If you need any help, please email me at terence @ hostpulse.com . I
will personally try to reply your email within a day and give you some basic
guidelines, negotiate with a few hosts to offer you good pricing or
answer any hosting related problems that you may have.
mysqli->insert_id -- Returns the auto generated id used in the last query
Description
Procedural style:
mixed mysqli_insert_id ( object link)
Object oriented style (property):
class mysqli { mixed insert_id }
The mysqli_insert_id() function returns the ID generated
by a query on a table with a column 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.
Note:
Performing an INSERT or UPDATE statement using the LAST_INSERT_ID()
function will also modify the value returned by the
mysqli_insert_id() function.
Return Values
The value of the AUTO_INCREMENT field that was updated
by the previous query. Returns zero if there was no previous query on the
connection or if the query did not update an AUTO_INCREMENT
value.
Note:
If the number is greater than maximal int value, mysqli_insert_id()
will return a string.
Example
Example 1. Object oriented style
<?php $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
Web Hosting Showcase
View the web hosting
showcase to find more relevant web hosting choice that will guide you in
selecting a good web hosting company.
This site provide
free reviews of web hosting services from 100 selected companies. There
are over 3000 over website hosting companies on the internet. Please
research these domain hosting services carefully before you sign up with
any. Read articles on web page hosting, web site hosting, domain names,
website speed test, cheap web hosting services, PHP scripts, mysql
database, asp hosting and virtual private server to gain a better
knowledge on domain hosting and cheap web hosting.