Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get id from last replaced record

Status
Not open for further replies.

QAteste

Technical User
Jun 14, 2002
23
US
How do you get the last replaced record id. Wondering if there is something similar to last_insert_id().

Thanks in advance!
 
mysql_affected_rows() ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
KarveR,

I don't think that is what he was looking for.


QAteste,

What you are looking for doesn't exist. mysql_insert_id() works only when the table generates a new id number on an autoincrement field. Updates do not generate new table IDs.

If you can give us some more specifics on your requirements, we might be able to come up with a workaround. ______________________________________________________________________
TANSTAAFL!
 
Thanks guys. I figured out a way to accomplish what I needed.
 
Oi Slepi wtf is this TANSTAAFL! stuff anyway.. been meaning to ask for ages :) ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
KarveR,

TAANSTAFL => There Ain't No Such Thing As A Free Lunch ______________________________________________________________________
TANSTAAFL!
 
u sure .. I ge em all the time ... thought it had something to do with STARS instead :) ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Actually it does have something to do with stars, but it's in reference to a thread from the Ethics forum.

Do you mean to sit there with that face on the front of your head and tell me that some one with whom you have no economic, social or familial connection buys you lunch on a regular basis? ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top