Mysql problem. - 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 problem. (
/showthread.php?tid=366734)
Mysql problem. -
budelis - 07.08.2012
Hi why not load this:
On the top of gamemode:
Код:
mysql_query( "SELECT Pelnas,Pelnas2,Pelnas3,Pelnas4,Pelnas5,Pelnas6,Pelnas7,Pelnas8,Pelnas9,Pelnas10,Pelnas11,Pelnas12,Pelnas13,Pelnas14 FROM Pelnai");
mysql_store_result( );
new savingstringXXXX[ 120 ];
if( mysql_fetch_row_format( savingstringXXXX ) )
{
sscanf( savingstringXXXX,"p<|>dddddddddddddd",
Pelnas[ 1 ],
Pelnas[ 2 ],
Pelnas[ 3 ],
Pelnas[ 4 ],
Pelnas[ 5 ],
Pelnas[ 6 ],
Pelnas[ 7 ],
Pelnas[ 8 ],
Pelnas[ 9 ],
Pelnas[ 10 ],
Pelnas[ 11 ],
Pelnas[ 12 ],
Pelnas[ 13 ],
Pelnas[ 14 ] );
}
mysql_free_result();
Код:
[18:54:43] >> mysql_query( Connection handle: 1 )
[18:54:43] CMySQLHandler::Query(SELECT Pelnas,Pelnas2,Pelnas3,Pelnas4,Pelnas5,Pelnas6,Pelnas7,Pelnas8,Pelnas9,Pelnas10,Pelnas11,Pelnas12,Pelnas13,Pelnas14 FROM Pelnai) - Successfully executed.
[18:54:43] >> mysql_store_result( Connection handle: 1 )
[18:54:43] CMySQLHandler::StoreResult() - Result was stored.
[18:54:43] >> mysql_fetch_row_format( Connection handle: 1 )
[18:54:43] >> mysql_free_result( Connection handle: 1 )
[18:54:43] CMySQLHandler::FreeResult() - Result was successfully free'd.
Код:
[18:54:43] >> mysql_query( Connection handle: 1 )
[18:54:43] CMySQLHandler::Query(SELECT Bankopinigai FROM Bankas) - Successfully executed.
[18:54:43] >> mysql_store_result( Connection handle: 1 )
[18:54:43] CMySQLHandler::StoreResult() - Result was stored.
[18:54:43] >> mysql_fetch_row_format( Connection handle: 1 )
[18:54:43] CMySQLHandler::FetchRow() - Return: 973450
[18:54:43] >> mysql_free_result( Connection handle: 1 )
[18:54:43] CMySQLHandler::FreeResult() - Result was successfully free'd.
( It's my other loading ). But why here is that loading line:
Код:
[18:54:43] CMySQLHandler::FetchRow() - Return: 973450
But in my first script that is not? and not loading no write anything to Pelnas[0-14];
Re: Mysql problem. -
budelis - 07.08.2012
fixed.