Re: Any Ideas?
| From: | Robert Cummings | Date: | Tue, 23 Mar 2004 01:18:41 +0000 |
| Subject: | Re: Any Ideas? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181213@lists.php.net to get a copy of this message | ||
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. |
`------------------------------------------------------------'