SA-MP Forums Archive
MySQL Error ID 1064 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Error ID 1064 (/showthread.php?tid=603272)



MySQL Error ID 1064 - theonethatownz - 20.03.2016

Quote:

[22:00:04] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[22:00:26] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Password`, `ID` FROM `accounts` WHERE `Name` = '%e' LIMIT 1"
[22:00:26] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Password`, `ID` FROM `accounts` WHERE `Name` = 'Adalsigi", callback: "OnAccountCheck", format: "i"
[22:00:26] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution
[22:00:26] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.686 milliseconds
[22:00:26] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[22:00:26] [DEBUG] Calling callback "OnAccountCheck"..
[22:00:26] [DEBUG] cache_get_data - connection: 1
[22:00:26] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[22:00:29] [DEBUG] mysql_format - connection: 1, len: 512, format: "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Admin`, `VIP`, `Money`, `PosX`, `PosY`, `PosZ`, `PosA`, `Skin`, `Thirst`, `Hu..."
[22:00:29] [DEBUG] mysql_format - connection: 1, len: 512, format: "INSERT INTO `accounts` (`Item1`, `Item2`, `Item3`, `Item4`, `Item5`, `Item6`, `Item7`, `Item8`, `Item9`, `Item10`) VALUES (0, 0,..."
[22:00:29] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `accounts` (`Item1`, `Item2`, `Item3`, `Item4`, `Ite", callback: "OnAccountRegister", format: "i"
[22:00:29] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution
[22:00:29] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - query was successfully executed within 51.794 milliseconds
[22:00:29] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[22:00:29] [DEBUG] Calling callback "OnAccountRegister"..
[22:00:29] [DEBUG] cache_insert_id - connection: 1
[22:00:29] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[22:00:31] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `accounts` SET `Money` = %d, `PosX` = %f, `PosY` = %f, `PosZ` = %f, `PosA` = %f, `Skin` = %d, `Thirst` = %d, `Hunger` = %..."
[22:00:31] [ERROR] mysql_format - destination size is too small
[22:00:31] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `accounts` SET `Item1` = %d, `Item2` = %d, `Item3` = %d, `Item4` = %d, `Item5` = %d, `Item6` = %d, `Item7` = %d, `Item8` ..."
[22:00:31] [ERROR] mysql_format - destination size is too small
[22:00:31] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `accounts` SET `Item1` = 0, `Item2` = 0, `Item3` = 0, `It", callback: "(null)", format: "(null)"
[22:00:31] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[22:00:31] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
[22:00:31] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError

Anyone know the issue?


Re: MySQL Error ID 1064 - itsCody - 20.03.2016

Increase the query string size


Re: MySQL Error ID 1064 - theonethatownz - 20.03.2016

Increased to 1024, mysql fields blank inside database?


Re: MySQL Error ID 1064 - theonethatownz - 20.03.2016

No errors inside mysql_log

Quote:

[22:25:32] [DEBUG] mysql_format - connection: 1, len: 1024, format: "UPDATE `accounts` SET `Money` = %d, `PosX` = %f, `PosY` = %f, `PosZ` = %f, `PosA` = %f, `Skin` = %d, `Thirst` = %d, `Hunger` = %..."
[22:25:32] [DEBUG] mysql_format - connection: 1, len: 1024, format: "UPDATE `accounts` SET `Item1` = %d, `Item2` = %d, `Item3` = %d, `Item4` = %d, `Item5` = %d, `Item6` = %d, `Item7` = %d, `Item8` ..."
[22:25:32] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `accounts` SET `Item1` = 0, `Item2` = 0, `Item3` = 0, `It", callback: "(null)", format: "(null)"
[22:25:32] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[22:25:32] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 67.944 milliseconds
[22:25:32] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving

but it's not writing anything to the mysql, though it was earlier?


Re: MySQL Error ID 1064 - theonethatownz - 20.03.2016

This is the section it writes the inital info into the table

Код:
            GetPlayerName(playerid, playername, sizeof(playername)); 
            GetPlayerIp(playerid, playerip, sizeof(playerip)); 
            WP_Hash(Player[playerid][Password], 129, inputtext); 
            mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Admin`, `VIP`, `Money`, `PosX`, `PosY`, `PosZ`, `PosA`, `Skin`, `Thirst`, `Hunger`, `Banned`, `Bans`, `Kicks`, `Warns`, `Muted`, `Quests`, `TimeH`, `TimeM`, `Infection`) VALUES ('%e', '%e', '%e', 0, 0, 0, %f, %f, %f, %f, 23, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0)", playername, Player[playerid][Password], playerip, SPAWN_X, SPAWN_Y, SPAWN_Z, SPAWN_A); 

			mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Item1`, `Item2`, `Item3`, `Item4`, `Item5`, `Item6`, `Item7`, `Item8`, `Item9`, `Item10`, `Storage`) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); 
			
            mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);



Re: MySQL Error ID 1064 - theonethatownz - 20.03.2016

This is the section it writes the inital info into the table

Код:
            GetPlayerName(playerid, playername, sizeof(playername)); 
            GetPlayerIp(playerid, playerip, sizeof(playerip)); 
            WP_Hash(Player[playerid][Password], 129, inputtext); 
            mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Password`, `IP`, `Admin`, `VIP`, `Money`, `PosX`, `PosY`, `PosZ`, `PosA`, `Skin`, `Thirst`, `Hunger`, `Banned`, `Bans`, `Kicks`, `Warns`, `Muted`, `Quests`, `TimeH`, `TimeM`, `Infection`) VALUES ('%e', '%e', '%e', 0, 0, 0, %f, %f, %f, %f, 23, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0)", playername, Player[playerid][Password], playerip, SPAWN_X, SPAWN_Y, SPAWN_Z, SPAWN_A); 

			mysql_format(mysql, query, sizeof(query), "INSERT INTO `accounts` (`Item1`, `Item2`, `Item3`, `Item4`, `Item5`, `Item6`, `Item7`, `Item8`, `Item9`, `Item10`, `Storage`) VALUES (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); 
			
            mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);