10.08.2015, 23:47
Title says all. I'm trying to get the correct value but it always returns 0.
pawn Код:
MySQL_GetValue(sqlid, fieldname[], tablename[])
{
new query[256];
format(query, sizeof(query), "SELECT %s FROM %s WHERE id = %d LIMIT 1", fieldname, tablename, sqlid);
mysql_tquery(dbHandle, query, "GetValue", "");
}
forward GetValue();
public GetValue()
{
new temp[64];
cache_get_row(0,0, temp);
new result = strval(temp);
return result;
}