21.10.2016, 09:53
hello, i have a problem in my gamemode.
when i take the function "mysql_fetch_field_row" for "PlayerInfo", the result is "0" for all.... i don't know why.
the script:
so User[playerid][pSQL] = strval(field); = 0 but it is not normal
mysql log:
sorry for my bad english, thanks
when i take the function "mysql_fetch_field_row" for "PlayerInfo", the result is "0" for all.... i don't know why.
the script:
PHP код:
format(string, sizeof(string), "SELECT * FROM `users` WHERE username = '%s'", gUsername[playerid]);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_field_row(field, "id"); User[playerid][pSQL] = strval(field);
}
mysql_free_result();
mysql log:
PHP код:
[11:31:28] CMySQLHandler::Query(SELECT * FROM `users` WHERE username = 'Angela') - Successfully executed.
[11:31:28] >> mysql_store_result( Connection handle: 1 )
[11:31:28] CMySQLHandler::StoreResult() - Result was stored.
[11:31:28] >> mysql_num_rows( Connection handle: 1 )
[11:31:28] CMySQLHandler::NumRows() - Returned 1 row(s)
[11:31:28] >> mysql_fetch_field_row( Connection handle: 1 )
[11:31:28] CMySQLHandler::FetchField("id") -
[11:31:28] >> mysql_query( Connection handle: 1 )