01.01.2015, 10:23
(
Последний раз редактировалось Desi_Dude; 02.01.2015 в 08:50.
)
Solved, thanks for you help! =)
mysql_connect( MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASS);
MySQL = mysql_connect( MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASS);
edit :
pawn Код:
pawn Код:
|
Show us mysql_log.txt file which you will find in your server log..
|
[20:04:14] [DEBUG] CMySQLConnection::Connect - connection was successful [20:04:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:04:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:04:14] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:05:03] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Password`, `ID` FROM `accounts` WHERE `Username` = '%e' LIMIT 1" [20:05:03] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Password`, `ID` FROM `accounts` WHERE `Username` = 'j0ke", callback: "OnAccountCheck", format: "i" [20:05:03] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution [20:05:03] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.728 milliseconds [20:05:03] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [20:05:03] [DEBUG] Calling callback "OnAccountCheck".. [20:05:03] [DEBUG] cache_get_data - connection: 1 [20:05:03] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [20:05:08] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `accounts` (`ID`, `Online`, `Password`, `IP`, `Admin", callback: "OnAccountRegister", format: "i" [20:05:08] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution [20:05:08] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (error #1054) Unknown column '' in 'field list' [20:05:08] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - error will be triggered in OnQueryError
[20:05:08] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (error #1054) Unknown column '' in 'field list'
format(szQuery, sizeof(szQuery), "INSERT INTO `accounts` (`ID`, `Online`, `Password`, `IP`, `Admin`, `Money` ,`Score` ,`SkinID`) VALUES ('%e', 0, `%s`, `%s`, 0, 0, 0, 299)", pInfo[playerid][pID], pInfo[playerid][pPass], IP[playerid]);
mysql_tquery(MySQL, szQuery, "OnAccountRegister", "i", playerid);
format(szQuery, sizeof(szQuery), "INSERT INTO `accounts` (`Online`, `Password`, `IP`, `Admin`, `Money` ,`Score` ,`SkinID`) VALUES (0, `%s`, `%s`, 0, 0, 0, 299)", pInfo[playerid][pPass], IP[playerid]);
mysql_tquery(MySQL, szQuery, "OnAccountRegister", "i", playerid);
pawn Код:
pawn Код:
pawn Код:
And make sure your `ID` column in table accounts is AUTO_INCREMENT |
[20:43:24] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [20:43:47] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Password`, `ID` FROM `accounts` WHERE `Username` = '%e' LIMIT 1" [20:43:47] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Password`, `ID` FROM `accounts` WHERE `Username` = 'j0ke", callback: "OnAccountCheck", format: "i" [20:43:47] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution [20:43:47] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 1.9 milliseconds [20:43:47] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [20:43:47] [DEBUG] Calling callback "OnAccountCheck".. [20:43:47] [DEBUG] cache_get_data - connection: 1 [20:43:47] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [20:43:50] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `accounts` (`Online`, `Password`, `IP`, `Admin`, `Mo", callback: "OnAccountRegister", format: "i" [20:43:50] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution [20:43:50] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (error #1054) Unknown column '2F9959B230A44678DD2DC29F037BA1159F233AA9AB183CE3A0678EAAE002E5AA6F27F47144A1A4365116D3DB1B58EC47896623B92D85CB2F191705DAF11858B8' in 'field list' [20:43:50] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - error will be triggered in OnQueryError