• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Best way to load data from database (MySQL r41)
#6
It is more efficient to use this method for most rescues

Code:
//global

new gQuery[ 256 ];



//local

gQuery[ 0 ] = EOS;

mysql_format( SQL, gQuery, sizeof gQuery, "UPDATE `players` SET `Hours`='%0.3f' WHERE `ID`='%d';", playerVariable[ playerid ][ pHours ], playerVariable[ playerid ][ pSQL ] );

mysql_tquery( SQL, gQuery, "", "" );



compared to this?

Code:
//local

new Query[ 70 ];

mysql_format( SQL, Query, sizeof Query, "UPDATE `players` SET `Hours`='%0.3f' WHERE `ID`='%d';", playerVariable[ playerid ][ pHours ], playerVariable[ playerid ][ pSQL ] );

mysql_tquery( SQL, Query, "", "" );
  Reply


Messages In This Thread
RE: Best way to load data from database (MySQL r41) - by shane adevaratu - 2020-12-20, 11:39 AM

Forum Jump: