On Saturday 17 February 2001 12:12, PHPBeginner.com wrote:
> I wonder, if LAST_INSERT_ID will work in here...
>
> I know it works when on the same file was an insertion.. but will it
> return you the last ever inserted id, say a week ago?
It will you return the id that was used on the last INSERT that *this*
process (i.e. this script while being executed right now) did.
=> it won't help.
> > MySQL table. I have a datetime field and an Auto_incremented field.
If you want the "newest" field, add a timestamp field and do a
SELECT * from that_table ORDER BY thetimestamp DESC LIMIT 1
a timestamp field in MySQL is by default automatically set to NOW() at
each INSERT and UPDATE if you don't set it yourself in the query.
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
Drink wet cement. Get stoned.
--
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]