Mysql冲码问题请求aa老大支援

Home Home
引用 | 编辑 月光
2007-04-05 11:15
楼主
推文 x0
近重我后台Mysql错误纪录中发现会员只要发表有冲码的字元连写入数据库都没办法了@@
以下是我后台MySql错误纪录中纪录到的讯息

复制程式
资料库更新资料时发生错误: INSERT INTO pw_threads (fid,icon,ifstyle,author,authorid,subject,ifcheck,type,stype,postdate,lastpost,lastposter,hits,replies,topped,digest,pollid,activeid,ifupload,ifreward,rewardinfo,ifsale,anonymous,autodel,autolock,ifsecrecy,ifsinglereply,report) VALUES (飳',཈',Ɔ','淡紫柔情',�','日本职棒》姜建铭抢首胜 流下英雄泪\',Ƈ',Ƈ',Ɔ',�',�','淡紫柔情',Ƈ',Ɔ',Ɔ',Ɔ',Ɔ',Ɔ',Ɔ','','','',Ɔ',Ɔ','','','','') 

复制程式
资料库更新资料时发生错误: INSERT INTO pw_posts (fid,tid,aid,author,authorid,icon,ifstyle,postdate,subject,userip,ifsign,ipfrom,ifconvert,ifcheck,content,iftop,ifreward,anonymous) VALUES (ཝ', 񠶄','','a9707', �', Ɔ', '', �','', ཹ.222.236.43', Ƈ', '台湾省中华电信', Ƈ',Ƈ','感谢大大提供分享,希望能顺利下载成功\','',Ɔ',Ɔ') 

而我发现这些错误有些MySql Server中不会发生也就是说有些一样可以些入数据库但是冲码的字元
会变成乱码但在部分MySql Server中就连写入都没办法了...所以想请教老大这有什么方法可以解决

献花 x0
引用 | 编辑 aa
2007-04-05 12:55
1楼
  
这个许功盖的问题,最快的方就是在程式中填入中文的栏位最后加一个空格,这样就可以避免掉错误..

复制程式
INSERT INTO pw_threads (fid,icon,ifstyle,author,authorid,subject,ifcheck,type,stype,postdate,lastpost,lastposter,hits,replies,topped,digest,pollid,activeid,ifupload,ifreward,rewardinfo,ifsale,anonymous,autodel,autolock,ifsecrecy,ifsinglereply,report) VALUES (飳',཈',Ɔ','淡紫柔情',�','$subject ',Ƈ',Ƈ',Ɔ',�',�','淡紫柔情',Ƈ',Ɔ',Ɔ',Ɔ',Ɔ',Ɔ',Ɔ','','','',Ɔ',Ɔ','','','','') 


献花 x0
引用 | 编辑 月光
2007-04-05 13:36
2楼
  
谢谢老大赐教,经过老大指点已经修正好了测试过后问题也解决了 表情

献花 x0