• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help with mysql and data retrieving.
#4
// under OnGameModeInit

mysql_tquery(mysql_connection// change this to yours, "SELECT * FROM `Factions`", "LoadFactions");





forward LoadFactions();

public LoadFactions()

{

new rows, fields;

cache_get_data( rows, fields, your conn handle );



if( rows )

{

for( new i = 0; i < rows; i )

{

cache_get_value_int(i,"id",Factions[i][ID]);

cache_get_value_name(i,"name",Factions[i][Name]);

cache_get_value_name(i,"type",Factions[i][Type]);

cache_get_value_name(i,"Rank1",Factions[i][Rank1]);

cache_get_value_name(i,"Rank2",Factions[i][Rank2]);

cache_get_value_name(i,"Rank3",Factions[i][Rank3]);

cache_get_value_name(i,"Rank1",Factions[i][Rank4]);

}

}

return (true);

}
  Reply


Messages In This Thread
RE: Help with mysql and data retrieving. - by DeploYeR - 2020-11-06, 04:57 PM

Forum Jump: