php-db | 2002122
Date: 12/26/02
- Next message: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Previous message: Leif K-Brooks: "Re: [PHP-DB] Cannot add header information error"
- Next in thread: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
for MS SQL and Oracle does anyone know a more reliable way to do this than select max(ID) immediately after the insert? It seems silly that I'd have to take my chances that another has been inserted in between.
<>< Ryan
-----Original Message-----
From: J.Veenhuijsen [mailto:info <email protected>]
Sent: Friday, December 06, 2002 1:52 AM
To: php-db <email protected>
Subject: [PHP-DB] Re: NewB: Return New Record ID...
Try $last=mysql_insert_id();
Jochem
Doug Coning wrote:
> Hi all,
>
> How do I do this:
>
> I need a PHP page that simply creates a "blank" record so that I have the
> record's ID (which is automatically generated). That same page then needs
> to return the record ID back so that I know what the ID is. I will later
> allow that record's information to be populated based on the ID it first
> returned.
>
> How would I do this?
>
> Thank you, thank you!
>
> Doug Coning
>
>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Previous message: Leif K-Brooks: "Re: [PHP-DB] Cannot add header information error"
- Next in thread: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Bernain, Fernando G.: "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Maybe reply: Ryan Jameson (USA): "RE: [PHP-DB] Re: NewB: Return New Record ID..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

