php – Zend Db SQLITE安装程序

即时尝试将sqlite设置为辅助适配器并遇到问题.

我收到以下消息:

Message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'reports.reports' doesn't exist

我的表代码是:

class Table_Reports extends Zend_Db_Table_Abstract {
protected $_name = 'reports';
protected $_id = 'report_id';
protected $_rowClass = 'Model_Report';
protected $_adapter = 'dbReports';
protected $_schema = 'reports';

}

如果我将$_schema更改为空白,则它会尝试使用我的主mysql数据库.

我的应用配置是:

resources.multidb.db1.adapter = "PDO_MYSQL"
resources.multidb.db1.host = "localhost"
resources.multidb.db1.dbname = "test"
resources.multidb.db1.username = "root"
resources.multidb.db1.password = ""
resources.multidb.db1.isDefaultTableAdapter = true

resources.multidb.db2.adapter = "PDO_SQLITE"
resources.multidb.db2.dbname = ROOT "/data/reports.db"

有谁知道发生了什么?

谢谢

我已经打开了Profiling,但据我所知,当我运行时出现错误时,没有任何内容被查询:

$reports = new Table_Reports();
$reportRow = $reports->createRow();

最佳答案 尝试使用APPLICATION_PATH和相对路径而不是ROOT.也许你有open_basedir限制或授权问题

点赞