(solved) If I try to add an Master Reset

Status
Not open for further replies.

IamShazam

New Member
Feb 7, 2019
21
1
1
25
Why the lines doesn't do the jobb? Am I missing something?

PHP:
$update = $dB->query("UPDATE "._TBL_MASTERLVL_." SET
                                "._CLMN_ML_LVL_." = 0,
                                "._CLMN_ML_EXP_." = 0,
                                "._CLMN_ML_POINT_." = "._CLMN_ML_POINT_." + (10 * "._CLMN_ML_GRESETS_."),
                                "._CLMN_ML_GRESETS_." = "._CLMN_ML_GRESETS_." + 1
                                WHERE "._CLMN_ML_NAME_." = ?", array($character_name));
the result of this is, "There has been an unexpected error, please contact the support team. " It should work if it worked when I rewrote a line for the resets, everything is in the same table.
 

Mon

Administrator
Developer
Nov 8, 2018
177
43
28
Try enabling debug mode to get the error message.
 

IamShazam

New Member
Feb 7, 2019
21
1
1
25
There is something that I do not understand with the column int, not null mlPoint. Seems like it ignore the mlPoint, seeing it from the SQL Management it works fine.

SQL:
UPDATE Character SET
                mLevel = 700,
                mlPoint = 400,
                i4thSkillPoint = 300,
                MagicList = NULL
                WHERE Name = 'IamShazam'
Works fine in the SQL Management but not in the website.
 

Mon

Administrator
Developer
Nov 8, 2018
177
43
28
Seems to be fine. Are you using 1.2.0 ?

if so check for database errors on /includes/logs/
 

IamShazam

New Member
Feb 7, 2019
21
1
1
25
SQL:
[SQL HY000] [dblib 20018] > Incorrect syntax near '='. [20018] (severity 15) [Character SET
                mLevel = 700,
                mlPoint = 400,
                i4thSkillPoint = 300,
                MagicList = NULL
                WHERE Name = 'IamShazam']
That is the error I get but the syntax is correct as I see I am separating them from a (,) almost all of the lines are a success but mlPoint is not recognizing by some how.
 

Mon

Administrator
Developer
Nov 8, 2018
177
43
28
SQL:
[SQL HY000] [dblib 20018] > Incorrect syntax near '='. [20018] (severity 15) [Character SET
                mLevel = 700,
                mlPoint = 400,
                i4thSkillPoint = 300,
                MagicList = NULL
                WHERE Name = 'IamShazam']
That is the error I get but the syntax is correct as I see I am separating them from a (,) almost all of the lines are a success but mlPoint is not recognizing by some how.

Show me your PHP code around that query as well please
 

Mon

Administrator
Developer
Nov 8, 2018
177
43
28
PHP:
            $update = $this->muonline->query("Character SET
                mLevel = 700,
                mlPoint = 400,
                i4thSkillPoint = 300,
                MagicList = NULL
                WHERE Name = ?", array($character_name));
Your SQL query is incomplete, you need to begin your query with the UPDATE statement.
 
  • Like
Reactions: IamShazam
Status
Not open for further replies.