From:             [EMAIL PROTECTED]
Operating system: linux 2.2
PHP version:      4.0.4pl1
PHP Bug Type:     MySQL related
Bug description:  mysql_insert_id() returns incorrect value

Example script:

mysql> use test;
mysql> create table mytable (a int primary key auto_increment, b int, c int);

        mysql_query("insert into mytable values (null, 5, 6)");
        echo mysql_insert_id();
        $res = mysql_query("select last_insert_id()");
        $row = mysql_fetch_row($res);
        echo "<BR>$row[0]";

Example output:


Mysql 2.23.33; using the library provided with mysql (ie configure --with-mysql=/usr).

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to