[Help] MySQL insert query (error)
#1

I have an error in MySQL insert query:
Код HTML:
ERROR:CMySQLQuery::Execute[OnPlayerRegister]
MESSAGE:(error #1054) Unknown column 'email' in 'field list'
Part of the code:
Код:
new 
        query[512], hashed_pass[129];

WP_Hash(hashed_pass, sizeof(hashed_pass), PlayerData[playerid][Password]);

mysql_format(MySQL_Handle, query, sizeof query, "INSERT INTO `players` SET \
    `name` = '%e',\
    `email` = '%e',\
    `password` = '%s',\
    `country` = '%d',\
    `age` = '%d'", 
PlayerData[playerid][Name], PlayerData[playerid][Email], hashed_pass, 
PlayerData[playerid][Country], PlayerData[playerid][Age]);

mysql_tquery(MySQL_Handle, query, "OnPlayerRegister", "d", playerid);
What is the problem? I tried to throw 'email' field, but the error was not repair, it is still there, but this time for 'country' field.

DB structure of `players` table:
Reply


Messages In This Thread
[Help] MySQL insert query (error) - by SteeLFelna - 20.06.2016, 14:45
Re: [Help] MySQL insert query (error) - by Stinged - 20.06.2016, 15:02
Re: [Help] MySQL insert query (error) - by SteeLFelna - 20.06.2016, 15:53
Re: [Help] MySQL insert query (error) - by GhostHacker - 20.06.2016, 15:54

Forum Jump:


Users browsing this thread: 1 Guest(s)