note 14171 added to function.mysql-insert-id.php
| From: | darianlassan at yahoo dot de | Date: | Thu, 19 Jul 2001 15:04:13 +0000 |
| Subject: | note 14171 added to function.mysql-insert-id.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15595@lists.php.net to get a copy of this message | ||
Acording to mark@wildrhino.com 24-Jun-2001 04:38:
Check with (mysql_affected_rows()>0) if mysql_insert_id() returns a real id.
<?php
if (mysql_affected_rows()>0) $id=mysql_insert_id();
?>
http://www.php.net/manual/en/function.mysql-insert-id.php