When data is inserted into MYSQL, the following error occurs: YouhaveanerrorinyourSQLsyntax; checkthemanualthatcorrespondstoyourMySQLserverversionfortherightsyntaxto: The data is not successfully inserted into MYSQL.
Error message:
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't produce ultraviolet light, make the ring 6. its become more clean and comfort 'at line 8
ECHO:
After testing, it should be because the re_mark field has a problem, because it is successful when I try to insert a relatively small number of words into this field.
(The type definition of the re_mark field is... re_mark text ,....
SQL code
Insert into product (p_name, p_class, p_model, re_mark, pic) values ('large object', 'large object', 'ddfdf ', '1. energy saving: 70% energy than common fluorescent lamp; 2. the green environmental protection: LED tube no ultraviolet, such as infrared no radiation and contains no mercury and other harmful substances; 3. long life: LED tube normal use for 50000 hours; 4. no stroboscopic: LED constant current work, effectively reduce LED light failure, start fast, no flash, protect eyes; 5. reduce mosquito: different from other light source ultraviolet attract a mosquito, LED don't produce ultraviolet light, make the ring 6. its become more clean and comfortable; 7. color is rich: make full use of the advantage of rich color LED production varous emitting light colors tubes; 8. use chip Epistar from taiwan, luminous efficiency is the highest; 9. shell with 1/2 aluminium, 1/2 PC material, circuit boards use high strength fiber board, combined with compact structure and assembly process, so that only the tube heat sex greatly improved, ensure that LED work in low temperature and try to minimize the LED light failure; 10.The application places: office buildings, factories, shopping MLEs, schools, public, indoor lighting and color, such as home decoration and through the CE and ROHS the authentication. ', 'upfiles/CR-kNgqQmYmuw.jpg ')
------ Solution --------------------
In the highlighted SQL code mode of the Forum, the string should be red, while the re_mark part is colorful.
Observe the LED don't at the end of the red part. Obviously, the "'" has been escaped.
Since you have not followed the SQL instruction writing conventions, you have to taste the consequences of violation.
------ Solution --------------------
Discussion
SQL code
Insert into product (p_name, p_class, p_model, p_speca, p_specb, p_specc, p_specd, p_spece, p_specf, p_specg, p_spech, p_speci, p_specj, p_speck, re_mark, in_time, title, pic) values ('20160301', '20160301 ',......