Mysql update AUTO_INCREMENT id.
...
|
Re: Mysql update AUTO_INCREMENT id.
Why do you need to add another column? It is already tracking the SteamID.
|
Re: Mysql update AUTO_INCREMENT id.
explain bether what you want to do.
|
Re: Mysql update AUTO_INCREMENT id.
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:
|
Re: Mysql update AUTO_INCREMENT id.
If you think these are stupid questions then you should probably figure out that your English and ability to explain the problem are severely lacking.
|
Re: Mysql update AUTO_INCREMENT id.
no, just explain bether (other words, other example) what your approach is. I dont understand what you want...
|
Re: Mysql update AUTO_INCREMENT id.
If that is why you think you need ID, then it is wrong. Based on what you have shown so far, the existing record is updated based on SteamID and MapName. Maybe if you provide more code, we can understand what you are trying to do.
|
Re: Mysql update AUTO_INCREMENT id.
The problem is that you have not clearly explained yourself. So, I am going to guess at what you are talking about
You had an existing table and then you added a new column and set it to Auto_Increment. When you do this, you need to MANUALLY set the Auto_Increment value on all existing data and then MANUALLY change the Next Auto_Increment value to the actual next value. If you have an existing table with data, you need to determine the ID of the row you want to update before you actually update it, otherwise your query will insert a new row or fail for having more than 1 match. |
Re: Mysql update AUTO_INCREMENT id.
Quote:
Quote:
|
Re: Mysql update AUTO_INCREMENT id.
First you have to do
PHP Code:
PHP Code:
PHP Code:
(don't know exact queries that you want to make but you get the idea, use the first one, then id = id+1 and update) |
| All times are GMT -4. The time now is 23:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.