18.06.2018, 09:49
Quote:
Setting column as string Value column as integer or w/e |
I know just on this way with strcmp,but i think it's not good
Код:
mysql_tquery(g_SQL,SELECT * FROM `settings`","LoadSettings");
Код:
forward LoadSettings(); public LoadSettings() { new rows = cache_num_rows(); new setting[20],value; if(rows) { for(new i; i<rows; i++) { cache_get_value_name(i,"SettingName",setting); cache_get_value_int(i,"Value",value); if(strcmp(setting, "isAds") == 0) { ServerInfo[isAds] = value; } else if(strcmp(setting, "isReport") == 0) { ServerInfo[isReport] = value; } .. ... } } return 1; }