Mysql - update multiple rows!
#1

Hey, I'm new to SA:MP programming, but I have some experience with PHP and Mysql programming.
I'm using Vortex gamemode and I'm having a problem with the cars.

So, the vehicles table contains the rows id, x, y, z and some other stuff..

What I'm trying to do is everytime the gamemode starts (ongamemodeinit or something.. ) to have the ids of the cars ordered. So, if I have 5 cars with the ids 1, 2, 4, 6 and 11, I want the ids to be updated to 1, 2, 3, 4 and 5.

I need a function like:
Код:
stock updatecarid(){
 while(something){
    // update the cars ids!
 }
}
I tried doing that for a few hours and.. nothing.
Can someone please help me?

Thanks!
Reply


Messages In This Thread
Mysql - update multiple rows! - by im - 04.03.2012, 18:04
Re: Mysql - update multiple rows! - by Vince - 04.03.2012, 18:30
Re: Mysql - update multiple rows! - by im - 04.03.2012, 18:41
Re: Mysql - update multiple rows! - by Gamer_Z - 04.03.2012, 20:55
Re: Mysql - update multiple rows! - by im - 05.03.2012, 06:12
Re: Mysql - update multiple rows! - by jameskmonger - 05.03.2012, 06:22
Re: Mysql - update multiple rows! - by Gamer_Z - 05.03.2012, 13:52

Forum Jump:


Users browsing this thread: 1 Guest(s)