install.mysql.utf8.sql不起作用

时间:2013-11-24 15:51:29

标签: mysql xml joomla utf-8

安装文件位于sql/mysql/文件夹下。但是,未安装install.mysql.utf8.sql文件。我跟着these instructions for Joomla没有成功:

<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="2.5.0" client="site" method="upgrade">
<name>practic_module</name>
<author>John Doe</author>
<version>1.0.0</version>
<description>this is a practice module struckture</description>
<files>
    <filename>mod_helloworld.xml</filename>
    <filename module="mod_helloworld">mod_helloworld.php</filename>
    <filename>index.html</filename>
    <filename>helper.php</filename>
    <filename>tmpl/default.php</filename>
    <filename>tmpl/index.html</filename>
</files>
<config>
<install>
 <sql>
     <file driver="mysql" charset="utf8">sql/mysql/install.mysql.utf8.sql</file>
     <file driver="sqlazure"            charset="utf8">sql/sqlazure/install.sqlazure.utf8.sql</file>
 </sql>
</install>

<uninstall>
 <sql>
     <file driver="mysql" charset="utf8">sql/mysql/uninstall.mysql.utf8.sql</file>
     <file driver="sqlazure" charset="utf8">sql/sqlazure/uninstall.sqlazure.utf8.sql</file>
 </sql>
</uninstall>

<update> 
<schemas>
    <schemapath type="mysql">sql/mysql/updates</schemapath> 
    <schemapath type="sqlazure">sql/sqlazure/updates</schemapath> 
</schemas> 
</update>

<fields name="params">
<fieldset name="basic">
    <field name="lang" type="sql" default="1" label="Select a language" query="SELECT  id AS value, lang FROM #__helloworld" />
</fieldset>
</fields>


</config>

</extension>

我的sql文件目录是C:\xampp\htdocs\joom\modules\mod_helloworld\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');

但是安装时不会创建数据库。我的错误在哪里?

0 个答案:

没有答案