• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] mysql_query to tquery inline
#1
this one work



Code:
GetVehicleCount(playerid) { ? ? new threadCheck[128], count; ? ? mysql_format(ourConnection, threadCheck, sizeof(threadCheck), "SELECT COUNT(*) FROM vehicles WHERE VehicleOwnerDBID = %d", PlayerInfo[playerid][pDBID]); ? ? new Cache: result = mysql_query(ourConnection, threadCheck); ? ? cache_get_value_index_int(0, 0, count); ? ? cache_delete(result); ? ? return count; }



this is first time to using inline but its not work as I expect



Code:
GetVehicleCountEx(playerid) { ? ? new count; ? ? inline _CountVehicle() ? ? { ? ? ? ? new rows; ? ? ? ? if(cache_get_row_count(rows)) ? ? ? ? { ? ? ? ? ? ? cache_get_value_index_int(0, 0, count); ? ? ? ? } ? ? } ? ? MySQL_TQueryInline(ourConnection, using inline _CountVehicle, "SELECT COUNT(*) FROM vehicles WHERE VehicleOwnerDBID = %d", PlayerInfo[playerid][pDBID]); ? ? return count; }
  Reply


Messages In This Thread
mysql_query to tquery inline - by Zow - 2021-04-23, 05:07 PM
RE: mysql_query to tquery inline - by Awide - 2021-04-24, 08:46 AM