Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[已解决] pw7 转换 dz7.2+uc 的问题 错误1064: attachmentfields 的 description

[复制链接]
蕃薯仔 发表于 2010-3-23 22:39:34 | 显示全部楼层 |阅读模式
Time: 2010-3-23 2:02pm
SQL: REPLACE INTO <数据名字>.cdb_attachmentfields (aid, tid, pid, uid, description) VALUES ('', '120', '1373', '117', 'Wrist hurts. Kings don't.');
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 't.')' at line 1
Errormsg.: 可能原因:1.数据超长或类型不匹配;2.数据库记录重复
Errno.: 1064

我看了 pw_attachs的descrip的column 是有这个 Wrist hurts. Kings don't.
所以是这个标点符号的关系? don't 的 '?
所有在我的 pw_attachs 的 descrip 的column 有这些标点符号的都不能转?

step_6.php
line 81                                 $description        =        cutstr(htmlspecialchars(trim($at['desc'])), 100);

cutstr这个function 不是 php 的 built in function 但是在 dz的转换程序的 function.php 也没看到呢
请问那里能看到,或那里可以能知道是做什么的。谢谢
回复

使用道具 举报

蓝豆 发表于 2010-3-24 00:06:03 | 显示全部楼层
可能原因:1.数据超长或类型不匹配;2.数据库记录重复
回复

使用道具 举报

 楼主| 蕃薯仔 发表于 2010-3-24 00:50:18 | 显示全部楼层
我去掉那个 ‘ 就 ok了

那就是说 description内 不能用 ' ?
但是如果我的pw数据里的description 有很多 '  就辛苦了啊
回复

使用道具 举报

beijing200808 发表于 2010-3-24 10:28:11 | 显示全部楼层
  1. $description        =        addslashes(cutstr(htmlspecialchars(trim($at['desc'])), 100));
复制代码
addslashes 对 “ ' ”进行一下转义
回复

使用道具 举报

 楼主| 蕃薯仔 发表于 2010-3-24 13:29:16 | 显示全部楼层
addslashes 对 “ ' ”进行一下转义
beijing200808 发表于 2010-3-24 10:28


非常谢谢你的回复 等下我试试看
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-14 08:50 , Processed in 0.082640 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表