问题一般这样:
- Discuz! info: MySQL Query Error
- User: 枫叶
- Time: 2007-1-2 11:53am
- Script: /bbs/postmach.php
- SQL: SELECT * FROM cdb_postmach WHERE style='post' and sside='0' and value='好贴顶个先....'
- Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '='
- Errno.: 1267
- Similar error report has beed dispatched to administrator before.
复制代码
郁闷了一天,搜索了关于发帖机器人问题的所有帖子,都解决不了,
最后搜索"1267",找到https://discuz.dismall.com/thread-480356-1-1.html这个帖子~
根据他这里的方法,居然一搞就成功,谢谢该帖作者!
新安装的,直接改安装代码 在ENGINE=MyISAM 后加CHARSET=gbk,两者之间要有空格,再去升级数据库.
如已安装,已上传的文件不要管,只请BBS后台执行drop table cdb_postmach; 卸载语句,再重新用改了后的语句升级数据库~~
如install4.sql的如下:
- drop table if exists cdb_postmach;
- create table cdb_postmach (
- style varchar(20) not null default '',
- sside varchar(254) not null default '',
- cdate int(18) not null default '0',
- value text not null
- ) ENGINE=MyISAM CHARSET=gbk;
- insert into cdb_postmach values ('set', '0', 0, 'thison');
- insert into cdb_postmach values ('set', '0', 0, 'other');
- insert into cdb_postmach values ('set', '18', 0, 'reftime');
- insert into cdb_postmach values ('set', '5', 0, 'whatis');
- insert into cdb_postmach values ('set', '15', 0, 'usertime');
- insert into cdb_postmach values ('set', '0', '0', 'posttid');
- insert into cdb_postmach values ('set', '18', 0, 'posttime');
- insert into cdb_postmach values ('set', '2', '0', 'moneys');
- insert into cdb_postmach values ('set', '3', 0, 'replytime');
- insert into cdb_postmach values ('set', '0', 0, 'fids');
- insert into cdb_postmach values ('set', '2', 0, 'ext_type');
- insert into cdb_postmach values('set', '1', 0, 'closetopic');
- insert into cdb_postmach values ('set', '0', 0, 'moderatedstatus');
复制代码
[ 本帖最后由 老7 于 2007-1-2 18:22 编辑 ] |