Rosario
|
Posted: 01/16/2009, 9:53 AM |
|
All,
How do I dispay the last inserted record by a user ? Assume the User ID and
table ID (auto incremented) are inserted already in said table.
any herlp here would be great!
---------------------------------------
Sent from YesSoftware forum http://forums.codecharge.com/
|
|
|
Oper
Posts: 1195
|
Posted: 01/19/2009, 5:25 AM |
|
in mysql LAST_INSERT_ID();
but for portability (1), or to avoid isue during Multiple Row Insert (2) or ROllBack(3)
LAST_INSERT_ID() bhave different in depend of situation, Store Proceudre, Triggers.
Any Database:
you could always create your own UNIQUE string insert in one of the field of your Table
and after insert just do a ccdlookup for that UNIQUE string and get the new UserID
i personaly like the last one.
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
|
|
|