title: Joomla Module Install mySQL
body: <p>I am creating a new module, but this time I got an error while creating my database table. Also I am a kind of confused about the file structure for installing this. I have read the Joomla documentation and tried what they're saying:</p>
  
  <p>In my manifest I created the following install/remove (SQL) sections:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;extension type="module" version="3.1.0" client="site" method="upgrade"&gt;
      &lt;name&gt;Modulename&lt;/name&gt;
      &lt;author&gt;Jerry Schirrmann&lt;/author&gt;
      &lt;description&gt;A test module&lt;/description&gt;
      &lt;files&gt;
          &lt;filename&gt;mod_modulename.xml&lt;/filename&gt;
          &lt;filename module="mod_modulename"&gt;mod_modulename.php&lt;/filename&gt;
          &lt;filename&gt;index.html&lt;/filename&gt;
          &lt;filename&gt;helper.php&lt;/filename&gt;
          &lt;filename&gt;tmpl/default.php&lt;/filename&gt;
          &lt;filename&gt;tmpl/index.html&lt;/filename&gt;
          &lt;filename&gt;sql/mysql/install.mysql.utf8.sql&lt;/filename&gt;
          &lt;filename&gt;sql/mysql/uninstall.mysql.utf8.sql&lt;/filename&gt;
      &lt;/files&gt;
      &lt;config&gt;
          &lt;install&gt;
              &lt;sql&gt;
                  &lt;file driver="mysql" charset="utf8"&gt;sql/mysql/install.mysql.utf8.sql&lt;/file&gt;
                  &lt;file driver="sqlazure" charset="utf8"&gt;sql/sqlazure/install.sqlazure.utf8.sql&lt;/file&gt;
              &lt;/sql&gt;
          &lt;/install&gt;
  
          &lt;uninstall&gt;
              &lt;sql&gt;
                  &lt;file driver="mysql" charset="utf8"&gt;sql/mysql/uninstall.mysql.utf8.sql&lt;/file&gt;
                  &lt;file driver="sqlazure" charset="utf8"&gt;sql/sqlazure/uninstall.sqlazure.utf8.sql&lt;/file&gt;
              &lt;/sql&gt;
          &lt;/uninstall&gt;
      &lt;/config&gt;
  &lt;/extension&gt;
  </code></pre>
  
  <p>and created the following file structure: <br />
  mod_xxx/sql/mysql/install.mysql.utf8.sql <strong>&amp;</strong> mod_xxx/sql/mysql/install.mysql.utf8.sql</p>
  
  <p>Now he doesn't give me an error while installing, but just won't create my table.
  Is my file structure right? Or is the problem in one of my SQL files?</p>
  
  <p>EDIT: <br/>
  <em>Here is some of MYSQL code</em></p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `#__modulename` (
          `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 `#__modulename` (`hello`, `lang`) VALUES ('Hello World', 'en-GB');
  INSERT INTO `#__modulename` (`hello`, `lang`) VALUES ('Hola Mundo', 'es-ES');
  INSERT INTO `#__modulename` (`hello`, `lang`) VALUES ('Bonjour tout le monde', 'fr-FR');
  </code></pre>
  
  <p>My Joomla is currently on a 3.2, I am developing for 3.1.0.</p>