SQL problem saving data in table
#1

FIXED
Reply
#2

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.
Reply
#3

Thank you for your fast answer.
So, I don't necessarily have to put
pawn Код:
VALUES (...)
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.
Reply
#4

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.
Reply
#5

Problem fixed, please lock the thread.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)