linux中安mysql教程_向MYSQL中安插数据不成功

向MYSQL中插入数据不成功

报错内容:

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那对数据库插入数据的语句内容如下:

经过测试,应该是re_mark 字段出了问题,因为我尝试对这个字段插入比较少的字数时,是可以成功的。

(re_mark字段的类型定义是:... re_mark text,....

SQL codeinsert into product ( p_name,p_class,p_model,re_mark,pic ) values ( '大幅度反对','大幅度反对','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 various 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 malls, schools, public, indoor lighting and colour, such as home decoration and through the CE and ROHS the authentication.', 'upfiles/CR-kNgqQmYmuw.jpg' )

------解决方案--------------------

在论坛的加亮的SQL代码模式下,字符串应呈现红色,而你对应 re_mark 的部分却是五彩缤纷

观察红色部分结束的地方 LED don't ,很显然那个“'”么有做转义处理

既然你没有遵守 SQL 指令的书写约定,那么只有自己品尝违规的后果了

------解决方案--------------------

探讨

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 ( '2222','3333333',……

相关文章

相关视频

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值