On Mon, 2004-03-22 at 19:25, John W. Holmes wrote:
> Robert Cummings wrote:
> 
> > On Mon, 2004-03-22 at 18:51, Matthew Oatham wrote:
> > 
> >>Hi,
> >>
> >>are there any functions that retrieve the last primary key created in
> >>the MySQL table?
> > 
> > 
> > http://www.php.net/manual/en/function.mysql-insert-id.php
> 
> If you read the whole question, though, the poster wanted to use the ID 
> in the same query, just in another column. mysql_insert_id() or 
> LAST_INSERT_ID() wouldn't help in this case.

Actually I did read the entire question. The poster includes mention of
using insert, then update, or possibly locking the table. This logically
implies that he does not necessarily care whether the construction of
the ID occurs in the original query or not.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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

Reply via email to