SQLSTATE [42S02]:未找到基本表或視圖:1146表'desbest_full2.showdown_matches'沒有找到存在使用我的新magento模塊後:SQLSTATE [42S02]:未找到基本表或視圖:1146表XXX確實
可是爲什麼,如果我有內部app/code/local/Desbest/Showdown/sql/Showdown_setup/mysql4-install-1.php
<?php
echo 'Running This Upgrade: '.get_class($this)."\n <br /> \n"; die("Exit for now");
$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */
$installer->startSetup();
$installer->run("
CREATE TABLE {$this->getTable('showdown_matches')} (
--CREATE TABLE IF NOT EXISTS `showdown_matches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstproductid` int(11) NOT NULL,
`secondproductid` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`datenumber` varchar(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8_general_ci AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `showdown_votes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`matchid` int(11) NOT NULL,
`votedfor` varchar(10) NOT NULL,
`ip` varchar(50) NOT NULL,
`datenumber` varchar(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8_general_ci AUTO_INCREMENT=1 ;
");
$installer->endSetup();
MySQL的安裝腳本的模塊對我原先的Magento安裝工作。
嗨,最好,你的config.xml是什麼樣的? – ivantedja 2012-08-12 11:23:53
這是。 https://gist.github.com/8a2da27d4f71834292f6 – desbest 2012-08-12 11:33:06
註釋行是否有效? - 創建表如果不存在'showdown_matches'。你有沒有得到這個錯誤信息,然後你修復它,然後刷新頁面(並且錯誤仍然存在?)。如果是這樣,看看你的網址,如果你正在訪問'local.com/errors/report.php?id = ....' - >那就是問題所在。這是一個靜態頁面。我發現你的代碼沒有錯(如果我沒有錯過任何東西)。 – ivantedja 2012-08-12 16:15:17