2022年4月18日 星期一

"Unexpected beginning of statement mysql" when coping excel content to phpmyadmin

 There are quite many reference in Google that "Unexpected beginning of statement mysql" is casued by various careless mistake.


However, I experienced a situation that when I export a CSV from phpmyadmin, and do some equation in excel, when I try to paste the SQL statement into phpmyadmin, it shows "Unexpected beginning of statement mysql" .

 ERROR existed in my SQL statement over 70 times, and there's no careless mistake in my statement.

When I retype the SQL statement , it success, means that there's no error in my SQL statment.


The problem is because the "SPACE" character in the excel, after retype all " " (space) in my equation, the SQL statement success to run in phpmyadmin.

 

 

沒有留言:

Free Photo to 4R Certificate Photo

https://onsir.org/photo.php