2
我试图完成本教程与Joomla!:https://docs.joomla.org/J3.x:Creating_a_simple_module/Using_the_Database这个模块在Joomla 3.x中有什么问题?
mod_helloworld.xml是这样的:
......
<description>A simple Hello, World! module.</description>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/mysql/install.mysql.utf8.sql</file>
</sql>
</install>
<scriptfile>script.php</scriptfile>
......... ..
我已经制作了这个文件夹:(我的模块的根目录)/ sql/mysql 我已经在其上创建了“install.mysql.utf8.sql”文件,内容如下:
CREATE TABLE IF NOT EXISTS `#__helloworld` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`hello` text NOT NULL,
`lang` varchar(25) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
INSERT INTO `#__helloworld` (`hello`, `lang`) VALUES ('Hello World', 'en-GB');
INSERT INTO `#__helloworld` (`hello`, `lang`) VALUES ('Hola Mundo', 'es-ES');
INSERT INTO `#__helloworld` (`hello`, `lang`) VALUES ('Bonjour tout le monde', 'fr-FR');
但是,当我试图安装我的模块,我收到此错误:
Warning JInstaller: :Install: Error SQL DB function reports no errors. Extension Install: SQL error processing query: DB function reports no errors.
Error Error installing module
你绝对不应该使用MyISAM。自1.6以来Innodb是必需的。 – Elin