[ERROR] "cache_get_data" - invalid connection handle (ID = 1)
Добавил систему каптов по фрагам, не получается с загрузкой БД. Выдаёт ошибку "[ERROR] "cache_get_data" - invalid connection handle (ID = 1)"
[ERROR] "cache_get_data" - invalid connection handle (ID = 1)
PHP код:
publics:LoadGZ()
{
new rows, fields, temp [ 256 ];
cache_get_data ( rows, fields ) ;
new time = GetTickCount();
TOTALGZ = rows;
if(rows)
{
for ( new g; g < TOTALGZ ; g++ )
{
cache_get_row(g, 1, temp),GZInfo[g][gFrakVlad] = strval(temp);
cache_get_row(g, 2, temp), GZInfo[g][gCoords][0] = floatstr(temp);
cache_get_row(g, 3, temp), GZInfo[g][gCoords][1] = floatstr(temp);
cache_get_row(g, 4, temp), GZInfo[g][gCoords][2] = floatstr(temp);
cache_get_row(g, 5, temp), GZInfo[g][gCoords][3] = floatstr(temp);
cache_get_row(g, 6, temp), GZInfo[g][gRespa] = strval(temp);
GZInfo[g][gID] = GangZoneCreate(GZInfo[g][gCoords][0],GZInfo[g][gCoords][1],GZInfo[g][gCoords][2],GZInfo[g][gCoords][3]);
}
}
printf ( "[Загрузка]: LoadGangZone загружено: %d, за %d (ms)", TOTALGZ,GetTickCount()-time ) ;
return 1;
}
stock SaveGZ(g)
{
new ququgz[95];
mysql_format(connects,ququgz, 95, "UPDATE `gangzone` SET `id_frac`='%i' WHERE `gID`='%d'",GZInfo[g][gFrakVlad],g);
mysql_function_query (connects, ququgz, false, "", "" ) ;
return 1;
}
PHP код:
mysql_function_query(connects,"SELECT * FROM `gangzone`",true,"LoadGZ","");
Сама база данных http://pastebin.com/XqbDfuyb