note 82928 added to function.mysql-insert-id

From: Date: Fri, 02 May 2008 10:22:03 +0000
Subject: note 82928 added to function.mysql-insert-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-138990@lists.php.net to get a copy of this message
"Why on earth are you all arguing about the best way to get the next auto_increment value? The whole point is that it increments automatically. The name should be a give away." Because you need the same last id value in another table. So you need a way to identify it, in order to use it in the next query. This way its easier than using a new query to get the id like ORDER BY id DESC LIMIT 1 ---- Server IP: 89.248.170.61 Probable Submitter: 83.82.109.21 ---- Manual Page -- http://www.php.net/manual/en/function.mysql-insert-id.php Edit -- https://master.php.net/note/edit/82928 Del: integrated -- https://master.php.net/note/delete/82928/integrated Del: useless -- https://master.php.net/note/delete/82928/useless Del: bad code -- https://master.php.net/note/delete/82928/bad+code Del: spam -- https://master.php.net/note/delete/82928/spam Del: non-english -- https://master.php.net/note/delete/82928/non-english Del: in docs -- https://master.php.net/note/delete/82928/in+docs Del: other reasons-- https://master.php.net/note/delete/82928 Reject -- https://master.php.net/note/reject/82928 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#138990) next »