Jump to content
  • 0

Error in your SQL syntax;


MatheusRDS

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  30
  • Reputation:   2
  • Joined:  11/24/18
  • Last Seen:  

Could someone help me with this error?

Error line

if( getmapflag(.@Map$,mf_gvg) || getmapflag(.@Map$,mf_gvg_castle) )
		query_sql "INSERT INTO `pvp_flux_csd` (`char_id`, `type`, `kill`) VALUES (" + .@CID + ", 1, 1) ON DUPLICATE `KEY` kill=`kill`+1";

Error

: DB error - 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 'kill=`kill`+1' at line 1
[Debug]: at script.cpp:16590 - INSERT INTO `pvp_flux_csd` (`char_id`, `type`, `kill`) VALUES (150015, 0, 1) ON DUPLICATE KEY kill=`kill`+1
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  30
  • Reputation:   2
  • Joined:  11/24/18
  • Last Seen:  

Thank you for your attention, I did it that way and it worked.

query_sql "INSERT INTO `mvp_flux_csd` (`char_id`, `kill`) VALUES (" + .@CID + ", 1) ON DUPLICATE KEY UPDATE `kill`=`kill`+1";

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   167
  • Joined:  04/05/13
  • Last Seen:  

query_sql ("SELECT `xxx` FROM `tableName` WHERE `variableName`=" + xxxxxx + "", .@kill);

.@kill++;

then
  
query_sql "INSERT INTO `pvp_flux_csd` (`char_id`, `type`, `kill`) VALUES (" + .@CID + ", 1, 1) ON DUPLICATE `KEY` kill="+.@kill+";

Not sure but you can try.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...