13.02.2016, 10:42
Hi guys, i have problem with mysql loading, i have a vps witch are stored all my databases (database for minecraft 1000+ player online everyday...) and i added database for samp.. i have 35 systems loading like this:
and its just too slow, in this table "admini" i need to wait about 1min to load and table is empty..
but on my localhost its loading instant...
Код:
for(new h = 1; h < MAX_ADMINS; h++) {
new rows;
mysql_format(MySQL, Query, sizeof(Query), "SELECT * FROM admini WHERE ID = '%d'", h);
mysql_query(MySQL,Query);
rows = cache_get_row_count();
if(rows > 0) {
mysql_format(MySQL, Query, sizeof(Query), "SELECT * FROM `admini` WHERE `ID` = '%d'", h);
mysql_function_query(MySQL, Query, true, "UcitajAdmine", "i", h);
}
}
Код:
forward UcitajAdmine(id, ConnectionHandle);
public UcitajAdmine(id, ConnectionHandle) {
new Rows, Fields;
cache_get_data(Rows, Fields);
if(Rows > 0) {
new tmp[130];
cache_get_field_content(0, "ime", tmp);
format(AdminInfo[id][aIme], 129, "%s", tmp);
cache_get_field_content(0, "rank", tmp);
AdminInfo[id][aRank] = strval(tmp);
cache_get_field_content(0, "neakt", tmp);
AdminInfo[id][aNeakt] = strval(tmp);
cache_get_field_content(0, "pas", tmp);
format(AdminInfo[id][aPas], 60, "%s", tmp);
}
return 1;
}

