我想在“时事通讯订阅者”中添加多个列。我的模块名称是 Test_Advancenewsletter 为此我制作了 sql->advancenewsletter_setup->mysql4-install-0.1.0.php 并写
$installer = $this;
$installer->startSetup();
$installer->run("
ALTER TABLE {$this->getTable('newsletter_subscriber')}
ADD (`lastname` TEXT NULL,
`address` TEXT NULL,
`phoneno` INT(20) NULL);
");
$installer->endSetup();
在 config.xml 我写: -
<resources>
<advancenewsletter_setup>
<setup>
<module>Test_Advancenewsletter</module>
<class>Test_Advancenewsletter_Model_Resource_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</advancenewsletter_setup>
</resources>
但它不会创建列。提前致谢。