MYSQL Commands out of sync
#1

No clue whats going on with my old script. It keeps telling me that the mysql cannot save to my database because th ecommands are out of sync.

Please help

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch (
dialogid)
    {
        case 
DIALOG_REGISTER:
        {
            if(
strlen(inputtext) == 0)
            {
                
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Registration""Your account isnt registered. Please insert a password to continue.""Register""");
            }
            else
            {
                new 
passwordText[60], query[60], name[MAX_PLAYER_NAME];
                
GetPlayerName(playeridnamesizeof(name));
                
mysql_real_escape_string(inputtextpasswordText);
                
format(query,sizeof(query), "INSERT INTO accounts (playerName, playerPass`) VALUES ('%s', '%s')"name,passwordText);
                
mysql_query(query);
            }
        }
    }
    return 
1;

debug

PHP код:
[21:56:44] >> mysql_queryConnection handle)
[
21:56:44CMySQLHandler::Query(INSERT INTO accounts (playerNameplayerPass`) VALUES ('yll) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)
[21:56:44] OnQueryError() - Called. 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)