SA-MP Forums Archive
MySQL data load - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL data load (/showthread.php?tid=474495)



MySQL data load - deimantas1 - 08.11.2013

Hi, I want to get car units from MySQL, but I get variable name, not variable value.
My table:
http://www.part.lt/img/24e29761f44e7...d4d4b11227.png

MySQL log:
Код:
:33:29] CMySQLHandler::Query(SELECT 483, 418, 422, 478, 543, 554, 600, 555, 587, 401, 410, 436, 491, 496, 526, 527, 533, 549, 439, 542, 518, 534, 535, 536, 575, 426, 445, 507, 516, 529, 547, 550, 551, 585, 404, 400, 458, 479, 489, 500 FROM carvienetai) - Successfully executed.

[17:33:29] >> mysql_store_result( Connection handle: 1 )

[17:33:29] CMySQLHandler::StoreResult() - Result was stored.

[17:33:29] >> mysql_fetch_row_format( Connection handle: 1 )

[17:33:29] CMySQLHandler::FetchRow() - Return: 483|418|422|478|543|554|600|555|587|401|410|436|491|496|526|527|533|549|439|542|518|534|535|536|575|426|445|507|516|529|547|550|551|585|404|400|458|479|489|500
Code:
Код:
	new savingstring[100];
	mysql_query("SELECT 483, 418, 422, 478, 543, 554, 600, 555, 587, 401, 410, 436, 491, 496, 526, 527, 533, 549, 439, 542, 518, 534, 535, 536, 575, 426, 445, 507, 516, 529, 547, 550, 551, 585, 404, 400, 458, 479, 489, 500 FROM carvienetai");
	mysql_store_result();

	if(mysql_fetch_row_format(savingstring))
	{
		sscanf(savingstring,"p<|>dddddddddddddddddddddddddddddddddddddddd",
		v[483],
		v[418],
		v[422],
		v[478],
		v[543],
		v[554],
		v[600],
		v[555],
		v[587],
		v[401],
		v[410],
		v[436],
		v[491],
		v[496],
		v[526],
		v[527],
		v[533],
		v[549],
		v[439],
		v[542],
		v[518],
		v[534],
		v[535],
		v[536],
		v[575],
		v[426],
		v[445],
		v[507],
		v[516],
		v[529],
		v[547],
		v[550],
		v[551],
		v[585],
		v[404],
		v[400],
		v[458],
		v[479],
		v[489],
        v[500]);
  	}
   	mysql_free_result();



Re: MySQL data load - MyLife - 08.11.2013

Try to rename table name by insert some char in the front.

Ex. c483 c418 c422 .......