[Ajuda] MYSQL nгo salvando
#1

Bom, estou com um problema muito estranho relacionado ao MySQL

Eu nгo to conseguindo salvar nada, mesmo setando.

pawn Код:
mysql_format(g_dbConnection, gstring, sizeof gstring, "UPDATE `player_info` SET `money` = %d, `skin` = %d, `score` = %d, prof` = %d, habt` = %d, haba` = %d, habn` = %d WHERE `id` = %d",
            gPlayerInfo[playerid][playerMoney],
            gPlayerInfo[playerid][playerSkin],
            gPlayerInfo[playerid][playerScore],
            gPlayerInfo[playerid][playerProf],
            gPlayerInfo[playerid][playerHabT],
            gPlayerInfo[playerid][playerHabA],
            gPlayerInfo[playerid][playerHabN],
            gPlayerInfo[playerid][playerID]);
        mysql_function_query(g_dbConnection, gstring, false, #, #);
Exemplo de quando eu seto, mas na hroa de salvar continua = 0

pawn Код:
gPlayerInfo[playerid][playerHabT] = 1;
           
                GivePlayerMoney(playerid, -1000);

                mysql_format(g_dbConnection, gstring, sizeof gstring, "UPDATE `player_info` SET `habt` = 1, money` = %d WHERE `id` = %d", GetPlayerMoney(playerid), gPlayerInfo[playerid][playerID]);
                mysql_function_query(g_dbConnection, gstring, false, #, #);
pawn Код:
g_dbConnection = mysql_connect(DB_HOST, DB_USER, DB_NAME, DB_PASS);
No caso nem a habt e o money estгo salvando
Reply
#2

Verifique se estб retornando algum erro em OnQueryError, caso nгo a tenha adicione e poste os resultados:

pawn Код:
public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
{
    printf("\n\n\n\n-------------------------------------\n\
    [MYSQL] Ocorreu algum erro durante o uso\n\n\n\
    error_id: %02i - conexaoH: %02i\n\n\
    callback chamada: %s\n\n\
    %s\
    \n\n\n-------------------------------------"
, errorid, connectionHandle, callback, error);
    printf("query: %s", query);
    return 0x01;
}
Reply
#3

pawn Код:
[12:04:30] [ERROR] ProcessQueryThread() - Erreur de syntaxe prиs de '` = 58 WHERE `id` = 3' а la ligne 1 (error ID: 1064)
No log deu esse erro
Reply
#4

Tentei pesquisar sobre o assunto porem sу achei results em ingles, e nгo consegue entender bemm...
Reply
#5

estб faltando um ' antes do prof

`score` = %d, prof` = %d,

tente agora:
pawn Код:
"UPDATE `player_info` SET `money` = %d, `skin` = %d, `score` = %d, `prof` = %d, `habt` = %d, `haba` = %d, `habn` = %d WHERE `id` = %d"
Reply
#6

Код:
58 WHERE `id` = 3'
Erro de sintaxe novamente...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)