02.03.2012, 23:40
pawn Код:
stock MySQL_GetString(sqlid, fieldname[], tablename[])
{
new query[256];
format(query, sizeof(query), "SELECT `%s` FROM `%s` WHERE `id` = %d LIMIT 1", fieldname, tablename, sqlid);
mysql_query(query);
mysql_store_result();
new iValue = mysql_fetch_int();
mysql_free_result();
return iValue;
}
Im presuming you mean get string.