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

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" -

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

2002-12-12 Thread Max Clark
Hi- I am trying to insert information into mysql based with the sql queries below. When I run this insert from the mysql console everything works correct, however, when I run this through php the second sql query doesn't execute (I'm assuming there is a problem with the last_insert_id()). I have