[Mysql] Get the fields of a query and put them on a variable
#2

pawn Код:
new str[100];
    new query[300];
    format(query, sizeof(query), "SELECT * FROM `users` WHERE `username`='%s'", GetName(playerid));
    mysql_query(query);
    mysql_store_result();
    if(mysql_retrieve_row())
    {
        mysql_get_field("username", str);
        SendClientMessage(playerid, COLOR_GREEN, str);
    }
    mysql_free_result();
I tried this but it doesn't work, any tips?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)