Mysql question
#3

Quote:
Originally Posted by Hayden_Bruin
Посмотреть сообщение
This is my one here.
NOTE: if you just copy and paste this it will not work as we most likely have different names for our stuff. So just edit it around and get add you stuff in.
pawn Код:
stock ResetVehicleID()
{
    new Query[200];
    format(Query, sizeof(Query), "ALTER TABLE vehicles DROP id");
    mysql_query(Query);
    format(Query, sizeof(Query), "ALTER TABLE vehicles  ADD id INT(5) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
    mysql_query(Query);
}
With this code, you will need to also re-load the vehicles variables if you use the 'id' in-game. If you don't you will fuck it up pretty bad when trying to save (if you use id for that too).
Reply


Messages In This Thread
Mysql question - by KaleOtter - 16.02.2011, 22:39
Re: Mysql question - by Haydz - 17.02.2011, 01:59
Re: Mysql question - by Antonio [G-RP] - 17.02.2011, 02:11
Re: Mysql question - by _Tommy - 17.02.2011, 07:40
Re: Mysql question - by KaleOtter - 17.02.2011, 13:13

Forum Jump:


Users browsing this thread: 1 Guest(s)