There are two lines of the same code, from different php files, in the MySql database (UTF-8 format) operation, a line of code is normal, a line of code exception code 1, exception updateordersystem. productSetPName & #39; 333 car & #39; WhereBianhao & #39; XAHNBQ2LC42GJQP-25 & #39; prompt when saving this line of code to notepad: the code to be saved as Unicode is from file. php, File Save format UTF-8, the file is pure php file, no html code, no encoding mysqlphp database unicode
There are two lines of the same code, from different php files, when operating on the MySql database (UTF-8 format), a line of code is normal, a line of code exception
Code 1, exception
Update ordersystem. product Set PName = '2017 Auto' Where Bianhao = 'xahnbq2lc42gjqp-25 ';
When saving this line of code to notepad, the prompt is: you need to save it in Unicode format
Code from file A. php, File Save format UTF-8, the file is pure php file, no html code, no encoding conversion;
Code 2, normal
Update ordersystem. product Set PName = '2017 Auto' Where Bianhao = 'xahnbq2lc42gjqp-25 ';
When saving this line of code to notepad, the prompt is: save it as ANSI format directly
The code is from file B. php, File Save format UTF-8, the file also has html code, and meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8 "/
The two lines of code are different in the last number 'xahnbq2lc42gjqp-25', and the rest is normal.
Problem:
1. Why is the first code in Unicode format?
2. how can I replace the first code with a format that can be accepted by the database?