[ciapug] mysqli prepared statements

Carl Olsen carl-olsen at mchsi.com
Sat Dec 10 10:26:06 CST 2005


Does anyone know if you can use the mysqli->insert_id inside a prepared
statement to get the id of the record that has just been inserted?

I'm doing it with a select statement which uses the same parameters as the
insert statement and selects "MAX(id) AS id" as the output parameter.  It
works, but it's easy to make an error when typing it in.

Carl
http://www.carl-olsen.com/



More information about the ciapug mailing list