MySQL Foreach help
#1

Hey guys,

I am going to start on my first MySQL Vehicle Ownership system. It's an easy concept: A table vehicles, with all the neccesary data in it for the car's. Now is my question, how can I make a foreach loop for MySQL?
Like
pawn Код:
Foreach(No idea what here)
{
     UserCar[OWNER] = CreateVehicle(All the neccesary data...);
}
So, I use StrickenKid's plugin.
I know enough MySQL in PAWN, but I have no idea how to use the Foreach function... Or maybe a loop? :S

Thanks,

Bas
Reply
#2

pawn Код:
for(new vehid; vehid <= MAX_VEHICLES; vehid++) {
//SELECT `X, Y, Z` FROM `vehicles` WHERE `vehicleid' = vehid or whatever
//Then use X, Y, Z to spawn the car
}
Reply
#3

That is too MySQL intensive. I think there is another better way. Correct me if I'm wrong?
Thanks for the reply...

Bas
Reply
#4

Bump
Sorry, I really need this, and when your thread is on the second page, you will never get an answer anymore
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)