Re: PHP 4.0 Bug #5124: mysql_insert_id()
| From: | Wico de Leeuw | Date: | Mon, 19 Jun 2000 12:36:59 +0000 |
| Subject: | Re: PHP 4.0 Bug #5124: mysql_insert_id() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21723@lists.php.net to get a copy of this message | ||
Hiya
At 12:36 19-6-2000 +0000, andre.magnus@gmx.net wrote:
should be $idresult = mysql_insert_id($conn); This is not a bug! It's also documented this way mysql_insert)id needs the connection id not the query id Please close this bug report Greetz, WicoFrom: andre.magnus@gmx.netOperating system: Linux 2.2.14PHP version: 4.0.0 Release PHP Bug Type: MySQL relatedBug description: mysql_insert_id() When I tried to use my old PHP3-Scripts with that mysql_insert_id() - lines, it doesn't work on PHP4 the code is something like this: $sql = "insert into ..."; $result = mysql_query($sql, $conn); $idresult = mysql_insert_id($result);
the result is the following error message: Warning: Supplied argument is not a valid MySQL-Link resource in /usr/home/xx on line xx In PHP3 there was no problem like this - result was given to $idresult -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net