SQL problem saving data in table -
Varkoll - 05.07.2014
FIXED
Re: SQL problem saving data in table -
Konstantinos - 05.07.2014
Check the mysql logs. It might be an error in the syntax or the string is not big enough to store the whole text of the query.
As for the size of the query, you can try reducing. While creating the table, use default values so you won't have to insert those values (and their field's name) in the query.
Also grave accent "`" is not necessary around the table and fields' name so you can reduce more characters by that.
Re : SQL problem saving data in table -
Varkoll - 05.07.2014
Thank you for your fast answer.
So, I don't necessarily have to put
into my SQL directive ? It automatically takes the default values I set while creating my table ?
Also, I'll withdraw grave accent from my code to reduce characters , and check the MySQL logs.
Re : SQL problem saving data in table -
Varkoll - 05.07.2014
I checked mysql_log & it's a syntax error.
pawn Код:
[14:22:46] [DEBUG] mysql_format - connection: 1, len: 1024, format: "INSERT INTO `users` (`USERNAME`,`MDP`,`QS`,`RS`,`NiveauRP`,`ExpRP`,`Niveau`,`Exp`,`Age`,`Dance`,`Marche`,`Genre`,`Origine`,`VIP`..."
[14:22:46] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `users` (`USERNAME`,`MDP`,`QS`,`RS`,`NiveauRP`,`ExpR", callback: "SQL_registerPlayerData", format: "i"
[14:22:46] [DEBUG] CMySQLQuery::CMySQLQuery() - constructor called
[14:22:46] [DEBUG] mysql_tquery - scheduling query "INSERT INTO `users` (`USERNAME`,`MDP`,`QS`,`RS`,`NiveauRP`,`ExpRP`,`Niveau`,`Exp`,`Age`,`Dance`,`Marche`,`Genre`,`Origine`,`VIP`,`Hygiene`,`Soif`,`Faim`,`Vie`,`Bonheur`,`Endurance`,`Combat`,`Souhait`,`Argent`,`Skin`,`Force`,`NoteRP`,`Registring`,`PlayMinutes`,`PlayHours`,`askingJob`,`attestaion`,`niveauPecheur`,`vuFPS`,`sX`,`sY`,`sZ`,`sA`,`sInt`,`sVW`,`Self`,`Salaire`,`Rang`,`ExpJob`,`workDone`,`wIllegalSelf`,`wIllegalRang`,`wIllegalExp`,`Prime`,`wlDone`,`takingFirst`,`pAdmin`,`pMuteTicks`,`Mail`) VALUES ("..
[14:22:46] [DEBUG] CMySQLQuery::Execute[SQL_registerPlayerData(i)] - starting query execution
[14:22:46] [ERROR] CMySQLQuery::Execute[SQL_registerPlayerData(i)] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
[14:22:46] [DEBUG] CMySQLQuery::Execute[SQL_registerPlayerData(i)] - error will be triggered in OnQueryError
[14:22:46] [DEBUG] CMySQLQuery::Execute[SQL_registerPlayerData(i)] - data being passed to ProcessCallbacks()
[14:22:46] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
I'll try fix the problem by writing again the syntax.
Re : SQL problem saving data in table -
Varkoll - 05.07.2014
Problem fixed, please lock the thread.