Bug #3162: PHP4b3 - mysql_insert_id no longer accepts an arg
| From: | xmtj at rims dot com | Date: | Mon, 10 Jan 2000 19:40:46 +0000 |
| Subject: | Bug #3162: PHP4b3 - mysql_insert_id no longer accepts an arg | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-14473@lists.php.net to get a copy of this message | ||
From: xmtj@rims.com
Operating system: RH Linux 6.1
PHP version: 3.0.13
PHP Bug Type: MySQL related
Bug description: PHP4b3 - mysql_insert_id no longer accepts an arg
$result = mysql_insert($query)
$id = mysql_insert_id($result)
This worked in PHP3. It fails in php4b3 with an error message:
PHP Warning: Supplied argument is not a valid MySQL-Link resource in /home/httpd/html/yada.php
The solution:
$result = mysql_insert($query)
$id = mysql_insert_id()
Environment:
MySql: 3.22.27
PHP 4.03b
System: Linux rimsweb 2.2.12-20 #1 Mon Sep 27 10:25:54 EDT 1999 i586 unknown