Re: [PHP-DB] newbie - last_insert_id() with mysql

2002-12-12 Thread Peter Beckman
mysql_insert_id() is a PHP function, not a MYSQL function. You are also missing a close quote on your insert string. So you have to do it like this: $sql2 = insert into acl (adminId,transportId,securityId) values ('$userid',.last_insert_id().,'1'); Notice the string.function().string -- this

Re: [PHP-DB] newbie - last_insert_id() with mysql

2002-12-12 Thread 1LT John W. Holmes
mysql_insert_id() is a PHP function, not a MYSQL function. You are also missing a close quote on your insert string. So you have to do it like this: Correct, but LAST_INSERT_ID() is a MySQL function which is what he's using... $sql2 = insert into acl (adminId,transportId,securityId)