[SOLVED] SQL Error: You have an error in your SQL syntax lazarus / 16-Databases ---------------------------------------------------------------------- DanishMale · 2021-02-24 16:26 Hi guys I got a question which puzzles me... I got 2 queries one works the other doesn't.. This one WORKS: Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i UPDATE `tablename` SET `tablecolumn` = REPLACE(`tablecolumn`, 'ä', 'ä'); This DOESN'T: Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i UPDATE `tablename` SET `tablecolumn` = REPLACE(`tablecolumn`, 'ü','ü'); They are both implemented into the same Zeos Conn and Query in the same order as shown above. However the latter continously gives this error: SQL 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 'UPDATE `tablename` SET `tablecolumn` = REPLACE(`tablecolumn`, 'ü', '' If I test them in phpMyAdmin they work perfectly..... and I am aware of double ' around text items  Any one with an idea why ?`..... All help appreciated in advance My solution: Splitted each of these UPDATEs into seperate SQL to be executed and they all worked as expected..... perhaps Zvoni suggestion will work as well... this is NOT tested..... ---------------------------------------------------------------------- Zvoni · 2021-02-25 06:53 By any chance: It isn't the missing BLANK (Space) after the last comma in the paranthesis? That's the only difference i see. I remember doing Queries on a DB2, and DB2 seems to be very picky about correct spacing within Functions. No idea about MySQL. And maybe phpMyAdmin is preparsing the statement, so that missing BLANKS are "corrected" ---------------------------------------------------------------------- egsuh · 2021-02-26 07:01 Check the code of character ü. In your code it appears, but not in the error message.