[PHP] mysql - get actual row

2003-06-10 Thread Harry.de
Hi,
if i insert into a mysql table a row e.g.
   mysql_query(INSERT into TEST (testfield) VALUES ('This is a test'));
and the first field is an auto increment (e.g. NR),
how can i get the value of the auto increment NR i've actually inserted?

Tanks Harry






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mysql - get actual row

2003-06-10 Thread Tom Woody
On Tue, 2003-06-10 at 17:18, Harry.de wrote:
 Hi,
 if i insert into a mysql table a row e.g.
mysql_query(INSERT into TEST (testfield) VALUES ('This is a test'));
 and the first field is an auto increment (e.g. NR),
 how can i get the value of the auto increment NR i've actually inserted?

mysql_insert_id()

in the future a search of the archive first, or a search of php.net
would have found this.
 
-- 
Tom

In a world without boundaries why
do we need Gates and Windows?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php