LCKB
Query error - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128)
+------ Forum: Solved topics (https://lckb.dev/forum/forumdisplay.php?fid=158)
+------ Thread: Query error (/showthread.php?tid=3333)



- macacoloco - 04-28-2015


UPDATE t_characters SET a_char_index WHERE a_index = %d

query error : query[uPDATE t_characters SET a_char_index WHERE a_index = 358] / 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 'WHERE a_index = 358' at line 1]

 

 

 

Is fixed: UPDATE t_characters SET a_char_index = a_index WHERE a_index = %d

 

Second query:

 

UPDATE t_characters SET a_char_index = %d, a_assassinatos = %d, a_assassinatos2 = %d, a_assassinatos3 = %d, a_assassinatos4 = %d

 

 

 

 

Someone can help for fix this pls? I need update only 1 character no all characters




- peter3301 - 04-28-2015


like this:

update t_characters set a_char_index = 999999999 where a_index = 123321123321;




- macacoloco - 04-28-2015


thx, but this values is in auto predefined...

 

 

like this:

update t_characters set a_char_index = 999999999 where a_index = 123321123321;

Ex: "UPDATE t_characters SET a_char_index = a_index WHERE a_index = %d"

running : UPDATE t_characters SET a_char_index = a_index WHERE a_index = index char use

Ex2: UPDATE t_characters SET a_char_index = %d, a_assassinatos = %d, a_assassinatos2 = %d, a_assassinatos3 = %d, a_assassinatos4 = %d
running: UPDATE t_characters SET a_char_index = index char use, a_assassinatos = points kill 1, a_assassinatos2 = points kill 2, a_assassinatos3 = points kill 3, a_assassinatos4 = points kill 4

 

 

 

the problem is all chars update, i like only 1 update
 

 

 

 

 

2, 0, 2, 2, 358 need update only for 1 line, all line has updated




- macacoloco - 04-28-2015

I write all source for new query and work fine now, thx




- Nymphetamine - 04-28-2015

Closed