10.01.2015, 19:42
Hello i had do this but he doesent work ..
I wan to get a name frome a id in my MYSQL table
PHP код:
stock GetNameFID(NomFID)
{
new idName[26];
F(query, sizeof(query), "SELECT name FROM accountsWHERE id='%d'", playerInfo[NomFID][id]);
mysql_query(query);
mysql_store_result();
if(!mysql_num_rows())
{
print("Unable to load");
mysql_free_result();
return 0;
}
while(mysql_fetch_row(query))
{
mysql_get_field("name", idName); F(playerInfo[NomFID][name], 32, "%s", idName);
}
mysql_free_result();
return 1;
}