MySQL help
#1

Код:
forward AracYukle();
public AracYukle()
{
	new resultline[1024];
	new car[37][64];
	new query[100];
	mysql_real_escape_string("SELECT * FROM araclar ORDER BY id ASC",query);
	mysql_query(query);
	mysql_store_result();
    for(new h = 0; h < sizeof(DynamicCars); h++)
	{
		while(mysql_fetch_row(resultline)==1)
		{
			H_split(resultline, car, '|');
			h = AddStaticVehicleEx(strval(car[1]), floatstr(car[2]), floatstr(car[3]), floatstr(car[4]), floatstr(car[5]), strval(car[6]), strval(car[7]), -1);
			DynamicCars[h][cSQLid] = strval(car[0]);
			DynamicCars[h][CarModel] = strval(car[1]);
			DynamicCars[h][CarX] = floatstr(car[2]);
			DynamicCars[h][CarY] = floatstr(car[3]);
			DynamicCars[h][CarZ] = floatstr(car[4]);
			DynamicCars[h][CarAngle] = floatstr(car[5]);
			DynamicCars[h][CarColor1] = strval(car[6]);
			DynamicCars[h][CarColor2] = strval(car[7]);
			DynamicCars[h][FactionCar] = strval(car[8]);
			DynamicCars[h][CarType] = strval(car[9]);
			DynamicCars[h][CarValue] = strval(car[10]);
			DynamicCars[h][CarOwned] = strval(car[11]);
	        strmid(DynamicCars[h][CarOwner], car[12], 0, strlen(car[12]), 20);
	        strmid(DynamicCars[h][CarDescription],car[13], 0, strlen(car[13]), 20);
			DynamicCars[h][CarHealth] = floatstr(car[14]);
			DynamicCars[h][AracPatladi] = strval(car[15]);
			DynamicCars[h][AracKiraZaman] = strval(car[16]);
			DynamicCars[h][cSigorta] = strval(car[17]);
			DynamicCars[h][cKazaSayi] = strval(car[18]);
			DynamicCars[h][ModPaintjob] = strval(car[19]);
			DynamicCars[h][ModSpoiler] = strval(car[20]);
			DynamicCars[h][ModRoof] = strval(car[21]);
			DynamicCars[h][ModLeftSideSkirt] = strval(car[22]);
			DynamicCars[h][ModRightSideSkirt] = strval(car[23]);
			DynamicCars[h][ModExhaust] = strval(car[24]);
			DynamicCars[h][ModWheels] = strval(car[25]);
			DynamicCars[h][ModFrontBumper] = strval(car[26]);
			DynamicCars[h][ModRearBumper] = strval(car[27]);
			DynamicCars[h][ModStereo] = strval(car[28]);
			DynamicCars[h][ModHydraulics] = strval(car[29]);
			DynamicCars[h][ModNitro] = strval(car[30]);
			DynamicCars[h][ModNeon] = strval(car[31]);
			DynamicCars[h][ModAlarm] = strval(car[32]);
			DynamicCars[h][Panels] = strval(car[33]);
			DynamicCars[h][Doors] = strval(car[34]);
			DynamicCars[h][Lights] = strval(car[35]);
			DynamicCars[h][Tires] = strval(car[36]);
			AraciModifiyeEt(h);
			h++;
		}
	}
}
Would you change it for me?

I used MySQL plugin version:https://sampforum.blast.hk/showthread.php?tid=337810&page=20
Reply
#2

care to explain what's wrong with it ? No information = no help can be provided.
Reply
#3

No. You won't learn how to do it yourself if you don't try. All you have to do is try. If you fail, that's good. If you succeed, that's better. TRY.
Reply
#4

Quote:
Originally Posted by Isolated
Посмотреть сообщение
care to explain what's wrong with it ? No information = no help can be provided.
I'm trying to pull data.

This code is supposed to do, I want to transfer the database to the game carts.

However, I use my MySQL version does not work.

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
No. You won't learn how to do it yourself if you don't try. All you have to do is try. If you fail, that's good. If you succeed, that's better. TRY.
For I can not do here.

My goal is to take the data, the server took to transfer tools.
Reply
#5

I have to agree with RealCop228, you need to at least give it ago, I mean we can help you with errors that you may in counter, but can't complete full scripts for you
Reply
#6

There is an error. Transmit the data to the server, help me.

-bump
Reply
#7

Explain the error better- you're not making any sense.
Reply
#8

This is a data capture process, but the version I use is not compatible with the data to transmit to the game.

I really tried very hard and tried, but I could not.

I use MySQL plugin version: https://sampforum.blast.hk/showthread.php?tid=337810&page=20

I want to transfer the database to the game carts.
Reply
#9

What in the hell are you talking about? Put the marijuana down, drink some tea, take a shower, and come back when you have your head on right!

No but seriously.. are you saying that the data in your MySQL database is not compatible with the SA:MP server? Or, do you just want someone to update your code to use the cache functions?
Reply
#10

No, I just want to make the process of data extraction.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)