mysql problem
#1

I'm trying to make a stock to know if a player is registred or not, but isn't working , the code seems alright to me but some help will be apreciated

pawn Код:
stock IsUsernameRegistred( usernm[])
{
    new query[24];
    format(query, sizeof(query),"SELECT * FROM playerdb WHERE username = '%s'", usernm);
    mysql_query(query);
    mysql_store_result();
    printf(" rows.. = %d", mysql_num_rows());
    printf("%s",usernm);
    if(mysql_num_rows() != 0)
    {
        printf(" Player Registred ");
    }
    else
    {
        printf(" Player Not Registred ");
    }
    mysql_free_result();
    return 1;
}
Reply
#2

Solved.. The array of the query was to small *facepalm*,.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)