23.03.2012, 13:08
Can someone tell me what's wrong in here and is there any workaround to fix it?
pawn Код:
stock GetDataInt(tablename[], dataname[], targetname[], targetvalue[])
{
new res;
format(largestr, sizeof(largestr), "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", dataname, tablename, targetname, targetvalue);
mysql_function_query(connectionHandle, largestr, true, "DataInt", "d", res);
return res;
}
forward DataInt(&refint);
public DataInt(&refint)
{
new
rows,
fields,
storage[MAX_DATA]
;
cache_get_data(rows, fields, connectionHandle);
if(!rows)
return cellmin;
cache_get_row(0, 0, storage, connectionHandle);
refint = strval(storage);
return 1;
}