Date: 11/15/00
- Next message: Lawrence.Sheed <email protected>: "RE: [PHP] Dreamweaver 4 ignores PHP - again"
- Previous message: Tom Beidler: "[PHP] return most current insert row id"
- Maybe in reply to: Tom Beidler: "[PHP] return most current insert row id"
- Next in thread: Rodino, Justin Bain: "RE: [PHP] return most current insert row id"
- Reply: Rodino, Justin Bain: "RE: [PHP] return most current insert row id"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
SELECT * FROM table ORDER BY id DESC LIMIT 1;
will select all from the last entry to the first and limit itself to 1 row.
hope it is the answer you needed.
Cheers,
Maxim Maletsky,
-----Original Message-----
From: Tom Beidler [mailto:tbeidler1 <email protected>]
Sent: Thursday, November 16, 2000 10:45 AM
To: php-general <email protected>
Subject: [PHP] return most current insert row id
How can I return the a row id that was inserted in the same page/function?
I have a page where I display what was added to the cart. When I display the
information that was just inserted I would like to be able to make that same
page a recalculation page. That way the end user can immediately make
changes to the displayed info, ie. quantity.
To recalculate I need the item_id of the row I just inserted.
I just saw this in the mailing list but can't find anything in the archives
and I haven't had luck searching the manual.
Thanks,
Tom
>>.>>.>>>.>>>>>.>>>>>>>>>
Tom Beidler
Orbit Tech Services
805.455.7119 (cell)
805.682.8972 (phone)
805.682.5833 (fax)
tbeidler <email protected>
>>.>>.>>>.>>>>>.>>>>>>>>>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Lawrence.Sheed <email protected>: "RE: [PHP] Dreamweaver 4 ignores PHP - again"
- Previous message: Tom Beidler: "[PHP] return most current insert row id"
- Maybe in reply to: Tom Beidler: "[PHP] return most current insert row id"
- Next in thread: Rodino, Justin Bain: "RE: [PHP] return most current insert row id"
- Reply: Rodino, Justin Bain: "RE: [PHP] return most current insert row id"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

