> On Thursday 08 March 2001 06:42, you wrote:
> > Assuming that you do have a primary key, how can you grab the last
> > record you inserted?  Can you use @@IDENTITY, or something like that?
> 
> For that I'd add another field - type "timestamp".
> In MySQL, timestamp fields are automatically set to NOW() on each insert 
> and update *if* they are not set to something else in it (the insert or 
> update)

I would prefer using mysql_insert_id() if possible.
http://www.php.net/manual/en/function.mysql-insert-id.php

Regards,

Søren



--
PHP General Mailing List (http://www.php.net/)
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