You are here

function ad_external_install in Advertisement 5

Same name and namespace in other branches
  1. 5.2 external/ad_external.install \ad_external_install()
  2. 6.3 external/ad_external.install \ad_external_install()
  3. 6 external/ad_external.install \ad_external_install()
  4. 6.2 external/ad_external.install \ad_external_install()
  5. 7 external/ad_external.install \ad_external_install()

Ad_external module database schema. Copyright (c) 2007 Jeremy Andrews <jeremy@kerneltrap.org>. All rights reserved.

File

external/ad_external.install, line 9

Code

function ad_external_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
    default:
      db_query("CREATE TABLE {ad_external} (\n        aid INT(10) UNSIGNED NOT NULL DEFAULT '0',\n\n        url VARCHAR(255) NOT NULL DEFAULT '',\n\n        PRIMARY KEY (aid)\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
  }
  drupal_set_message(t('The necessary ad_external module tables have been created.'));
}