Raised This Month: $ Target: $400
 0% 

Mysql update AUTO_INCREMENT id.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 11-05-2013 , 13:37   Re: Mysql update AUTO_INCREMENT id.
Reply With Quote #5

I have no idea what you're saying, but if you need the id of the latest record added to the database, use SQL_GetInsertId. This will only give you the latest id of a row added by the handle of the plugin, so it will return something you don't want after you restart the server. To make it consistent, you will have to run a SELECT query, such as
Quote:
SELECT id FROM table ORDER BY id DESC LIMIT 0,1
Backstabnoob is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode