今天早用YP更新缓存,弹出如下错误:
随之而来的是错误信息是:
[php] view plain copy
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Driver\Db\DbMysql.class.php (320) trace(Table 'xmesmweb.yb_index' doesn't exist
- [ SQL语句 ] : SHOW COLUMNS FROM `yb_index`, , ERR)
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Driver\Db\DbMysql.class.php (107) DbMysql->error()
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Driver\Db\DbMysql.class.php (215) DbMysql->query(SHOW COLUMNS FROM `yb_index`)
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\Model.class.php (135) DbMysql->getFields(yb_index)
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\Model.class.php (123) Model->flush()
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\Model.class.php (1156) Model->_checkTableInfo()
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\Model.class.php (98) Model->db(0, )
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Common\common.php (276) Model->__construct(Index, , )
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\gznet\Lib\Action\BaseAction.class.php (248) M(Index)
- [14-12-03 10:48:12] () BaseAction->show(7, )
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\App.class.php (180) ReflectionMethod->invokeArgs(, Array)
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\App.class.php (218) App::exec()
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Lib\Core\Think.class.php (39) App::run()
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Common\runtime.php (253) Think::start()
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\Core\Core.php (30) require(E:\wwwweb\xmwszt360\Core\Common\runtime.php)
- [14-12-03 10:48:12] E:\wwwweb\xmwszt360\index.php (16) require(E:\wwwweb\xmwszt360\Core\Core.php)
那么问题出在哪儿呢,
[php] view plain copy
- trace(Table 'xmesmweb.yb_index' doesn't exist
名为:yb_index的表未创建,那就是创建表!找一个全部都创建的空数据库一个个的导出sql语句,再添加就好了!实际开发中可能遇到的并非这个,我遇到的是dbsoource表未创建:
[sql] view plain copy
- CREATE TABLE IF NOT EXISTS `s_dbsource` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(50) NOT NULL DEFAULT '',
- `host` varchar(20) NOT NULL DEFAULT '',
- `port` int(5) unsigned NOT NULL DEFAULT '3306',
- `username` varchar(50) NOT NULL DEFAULT '',
- `password` varchar(50) NOT NULL DEFAULT '',
- `dbname` varchar(50) NOT NULL DEFAULT '',
- `dbtablepre` varchar(30) NOT NULL DEFAULT '',
- PRIMARY KEY (`id`)
- ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
感谢浪子!
评论(0)