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 Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the last_auto increment value

Status
Not open for further replies.

perlone

Programmer
May 20, 2001
438
US
Hello,

I was wondering if anyone could show me how to get the last auto increment value from a table called 'news'. Thank You so much.

There is no Knowledge that is not power.
Age: 17
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
maybe a workaround is possible, but i need to know the logic...

Known is handfull, Unknown is worldfull
 
After an insert you can get the value with

Code:
select last_insert_id()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top