mysql -saving
#1

Hey guys,
i have a little problem with my sql-system.
It works pretty fine, but my user-name wont be save.
That is my big problem.
Here is some code:
pawn Код:
//Register
        new pName[MAX_PLAYER_NAME],query[300];
        GetPlayerName(playerid, pName, sizeof(pName));
        cvar[playerid] = 1;
        format(query, sizeof(query), "INSERT INTO samp_accounts (pKey,pName,cvar) VALUES ('%s','%s',%d)", password, pName,cvar[playerid]);
        printf("%s",query);
        mysql_query(query);
        mysql_free_result();
The query looks alright. My name is right in the "printf" output.
The database structure should be also alright, because, the key will be saved rightly.
Reply
#2

Can you show what the print says?

Also why are you using mysql_free_result when you haven't stored anything?

Additionally I suggest you enable MySQL logging, then you will be able to see if there is an error with the query in a new file called mysql_log.txt which is created when you enable logging.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)