Hi !
You can user mysql_insert_id() for this purpose.
zareef ahmed
--- Andrew Wood <[EMAIL PROTECTED]> wrote:
> If the primary key in a MySQL DB is an
> autoincrementing integer, is
> there anyway of automatically getting it back when I
> do an insert in
> PHP. In other words taking the stat
* Thus wrote John W. Holmes:
> Andrew Wood wrote:
> >Thanks. When it says 'the last insert' is that just the last insert my
> >PHP script did, or the last insert on the DB as a whole?
>
> Read the links Daniel just sent out.
And take care in reading the part about it returning the 'last
insert
Andrew Wood wrote:
Thanks. When it says 'the last insert' is that just the last insert my
PHP script did, or the last insert on the DB as a whole?
Read the links Daniel just sent out.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PH
Thanks. When it says 'the last insert' is that just the last insert my
PHP script did, or the last insert on the DB as a whole?
On 16 Jul 2004, at 11:40, [EMAIL PROTECTED] wrote:
If the primary key in a MySQL DB is an autoincrementing integer, is
there anyway of automatically getting it back whe
If the primary key in a MySQL DB is an autoincrementing integer, is
there anyway of automatically getting it back when I do an insert in
PHP. In other words taking the status returned by mysql_query and
extracting the PK of the record we just entered?
--
PHP General Mailing List (http://www.ph
5 matches
Mail list logo