You are here

function continents_api_install in Country codes API 5

Same name and namespace in other branches
  1. 6 contrib/continents_api/continents_api.install \continents_api_install()

Implementation of hook_install().

File

contrib/continents_api/continents_api.install, line 11
Install file for Continents API.

Code

function continents_api_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':

      //create countries db
      db_query("CREATE TABLE {continents_api_continents} (\n        continent char(2) NOT NULL,\n        country char(2) NOT NULL,\n        PRIMARY KEY (continent, country)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }

  // Include continents_api module include for initial data import.
  require_once dirname(__FILE__) . '/continents_api.module';
  continents_api_csv_import_continents();
}