20.06.2016, 14:45
(
Последний раз редактировалось SteeLFelna; 20.06.2016 в 14:50.
Причина: Added structure of table `players`
)
I have an error in MySQL insert query:
Part of the code:
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:
Код HTML:
ERROR:CMySQLQuery::Execute[OnPlayerRegister] MESSAGE:(error #1054) Unknown column 'email' in 'field list'
Код:
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);
DB structure of `players` table:


