note 99266 added to function.mysql-insert-id
| From: | alexmelo8813 at gmail dot com | Date: | Fri, 06 Aug 2010 21:38:44 +0000 |
| Subject: | note 99266 added to function.mysql-insert-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171444@lists.php.net to get a copy of this message | ||
This function is very helpful
is perferct to be user width a good database Class
fallow the example:
$create_quiz = $conexao->query("INSERT INTO quiz (titulo_quiz) VALUES
('$titulo_quiz')");
$quiz_id = mysql_insert_id();
Now i can use that id i just created, try to be careful with the order of your queries and position
of yours fetchArray.
Thx, Alexandre Melo ,Brazil
----
Server IP: 69.147.83.197
Probable Submitter: 186.204.196.217
----
Manual Page -- http://www.php.net/manual/en/function.mysql-insert-id.php
Edit -- https://master.php.net/note/edit/99266
Del: integrated -- https://master.php.net/note/delete/99266/integrated
Del: useless -- https://master.php.net/note/delete/99266/useless
Del: bad code -- https://master.php.net/note/delete/99266/bad+code
Del: spam -- https://master.php.net/note/delete/99266/spam
Del: non-english -- https://master.php.net/note/delete/99266/non-english
Del: in docs -- https://master.php.net/note/delete/99266/in+docs
Del: other reasons-- https://master.php.net/note/delete/99266
Reject -- https://master.php.net/note/reject/99266
Search -- https://master.php.net/manage/user-notes.php