note 104736 added to mysqli-stmt.insert-id

From: Date: Mon, 04 Jul 2011 14:16:39 +0000
Subject: note 104736 added to mysqli-stmt.insert-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-181225@lists.php.net to get a copy of this message
I just ran a test and for me the value is indeed the last inserted id. I prepared a MySQL statement, and executed the same statement several times, only changing the values, and every time I got the unique ID that I was expecting. Do you have auto_increment set in your table? Also, I am not sure where did you get the the mysqli_connection->insert_id from, there is no such thing. ---- Server IP: 69.147.83.197 Probable Submitter: 189.162.13.19 ---- Manual Page -- http://www.php.net/manual/en/mysqli-stmt.insert-id.php Edit -- https://master.php.net/note/edit/104736 Del: integrated -- https://master.php.net/note/delete/104736/integrated Del: useless -- https://master.php.net/note/delete/104736/useless Del: bad code -- https://master.php.net/note/delete/104736/bad+code Del: spam -- https://master.php.net/note/delete/104736/spam Del: non-english -- https://master.php.net/note/delete/104736/non-english Del: in docs -- https://master.php.net/note/delete/104736/in+docs Del: other reasons-- https://master.php.net/note/delete/104736 Reject -- https://master.php.net/note/reject/104736 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#181225) next »