修改前请作好备份!!!安装插件有危险!!!
有的朋友在安装的时候经常出现了两个错误
中文用户不用进入跟比赛时间到了还可以下注!!
第一个问题是因为数据库的编码的问题,第二个是因为PHP不同的版本对time()的定义有所不同造成的
注意:如果没有出现以上两种情况请不要作以下修改!否则又会造成错误了!
以下是两个问题的解决方法!!
1、如果比赛时间到了还可以下载,请*.php文件的所有的改为
时间误差就是时间误差就是快/慢了多少秒,一般都是28800(8个小时)
2、中文用户不能进入,提示数据库出错
Discuz! info: MySQL Query Error
User: 巍巍中华
Time: 2006-5-20 8:57pm
Script: /z_cup.php
SQL: SELECT win, lost, money FROM cdb_z_cup_winuser where username='巍巍中华'
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.
那就请重新升级数据库(注意:以下操作会删除你已经有的足球数据,请注意备份好原来博采数据)
- DROP TABLE IF EXISTS cdb_z_cup_dudan;
- DROP TABLE IF EXISTS cdb_z_cup_bsdudan;
- DROP TABLE IF EXISTS cdb_z_cup_spdudan;
- DROP TABLE IF EXISTS cdb_z_cup_winnerlist;
- DROP TABLE IF EXISTS cdb_z_cup_bswinnerlist;
- DROP TABLE IF EXISTS cdb_z_cup_spwinnerlist;
- DROP TABLE IF EXISTS cdb_z_cup_game;
- DROP TABLE IF EXISTS cdb_z_cup_bsgame;
- DROP TABLE IF EXISTS cdb_z_cup_spgame;
- DROP TABLE IF EXISTS cdb_z_cup_bswinuser;
- DROP TABLE IF EXISTS cdb_z_cup_winuser;
- DROP TABLE IF EXISTS cdb_z_cup_spwinuser;
- DROP TABLE IF EXISTS cdb_z_cup_class;
- CREATE TABLE cdb_z_cup_class (
- `id` smallint(6) unsigned NOT NULL auto_increment,
- `gameclass` varchar(40) NOT NULL default '',
- PRIMARY KEY (`id`)
- ) TYPE=MyISAM DEFAULT CHARSET=gbk;
- CREATE TABLE cdb_z_cup_dudan (
- `id` smallint(6) unsigned NOT NULL auto_increment,
- `username` varchar(15) NOT NULL default '',
- `gameid` smallint(6) unsigned NOT NULL default '0',
- `game1` smallint(2) unsigned NOT NULL default '0',
- `game2` varchar(10) NOT NULL default '',
- `duzhu` smallint(6) unsigned NOT NULL default '0',
- `addtime` int(11) NOT NULL default '0',
- PRIMARY KEY (`id`)
- ) TYPE=MyISAM DEFAULT CHARSET=gbk;
- CREATE TABLE cdb_z_cup_game (
- `id` smallint(6) unsigned NOT NULL auto_increment,
- `hteam` varchar(30) NOT NULL default '',
- `vteam` varchar(30) NOT NULL default '',
- `score` varchar(10) NOT NULL default '',
- `ending` tinyint(2) NOT NULL default '0',
- `gameclass` smallint(6) unsigned NOT NULL default '0',
- `gamedate` date NOT NULL default '0000-00-00',
- `gametime` time NOT NULL default '00:00:00',
- `addtime` int(11) NOT NULL default '0',`info` text NOT NULL,
- `hteamrate` float NOT NULL default '0',
- `equalrate` float NOT NULL default '0',
- `vteamrate` float NOT NULL default '0',
- PRIMARY KEY (`id`)
- ) TYPE=MyISAM DEFAULT CHARSET=gbk;
- CREATE TABLE cdb_z_cup_winnerlist (
- `id` smallint(6) unsigned NOT NULL auto_increment,
- `username` varchar(15) NOT NULL default '',
- `gameid` smallint(6) unsigned NOT NULL default '0',
- `gametime` date NOT NULL default '0000-00-00',
- `winmoney` mediumint(6) NOT NULL default '0',
- `gametype` varchar(10) NOT NULL default 'sc',
- PRIMARY KEY (`id`)
- ) TYPE=MyISAM DEFAULT CHARSET=gbk;
- CREATE TABLE cdb_z_cup_winuser (
- `id` smallint(6) unsigned NOT NULL auto_increment,
- `username` varchar(15) NOT NULL default '',
- `win` smallint(6) unsigned NOT NULL default '0',
- `lost` smallint(6) unsigned NOT NULL default '0',
- `money` mediumint(6) NOT NULL default '0',
- PRIMARY KEY (`id`)
- ) TYPE=MyISAM DEFAULT CHARSET=gbk;
- CREATE TABLE cdb_z_cup_spgame (
- `id` smallint(6) unsigned NOT NULL auto_increment,
- `ateam` varchar(30) NOT NULL default '',
- `bteam` varchar(30) NOT NULL default '',
- `cteam` varchar(30) NOT NULL default '',
- `dteam` varchar(30) NOT NULL default '',
- `eteam` varchar(30) NOT NULL default '',
- `fteam` varchar(30) NOT NULL default '',
- `gteam` varchar(30) NOT NULL default '',
- `hteam` varchar(30) NOT NULL default '',
- `score` varchar(10) NOT NULL default '',
- `ending` tinyint(2) NOT NULL default '0',
- `gameclass` smallint(6) unsigned NOT NULL default '0',
- `gamedate` date NOT NULL default '0000-00-00',
- `gametime` time NOT NULL default '00:00:00',
- `addtime` int(11) NOT NULL default '0',`info` text NOT NULL,
- `ateamrate` float NOT NULL default '0',
- `bteamrate` float NOT NULL default '0',
- `cteamrate` float NOT NULL default '0',
- `dteamrate` float NOT NULL default '0',
- `eteamrate` float NOT NULL default '0',
- `fteamrate` float NOT NULL default '0',
- `gteamrate` float NOT NULL default '0',
- `hteamrate` float NOT NULL default '0',
- PRIMARY KEY (`id`)
- ) TYPE=MyISAM DEFAULT CHARSET=gbk;
- ALTER TABLE cdb_z_cup_game ADD `bsopen` tinyint(2) DEFAULT '1' NOT NULL,ADD `bsbrate` float NOT NULL default '0',ADD
- `bssrate` float NOT NULL default '0',ADD `bsending` tinyint(2) DEFAULT '1' NOT NULL,ADD `yqopen` tinyint(2) DEFAULT '0' NOT NULL,ADD `yqtype` tinyint(2) DEFAULT '1' NOT NULL,ADD `yqrate` float NOT NULL default '1';
- ALTER TABLE cdb_z_cup_dudan ADD `gametype` varchar(10) NOT NULL default 'sc';
复制代码
[ 本帖最后由 alantam 于 2006-6-10 14:09 编辑 ] |