Jump to content
  • 0

Error in your SQL syntax;


Question

Posted

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

2 answers to this question

Recommended Posts

  • 0
Posted

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";

 

  • 0
Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...