You are here

function ad_weight_percent_install in Advertisement 5.2

Same name and namespace in other branches
  1. 5 weight/percent/ad_weight_percent.install \ad_weight_percent_install()
  2. 6.3 weight/percent/ad_weight_percent.install \ad_weight_percent_install()
  3. 6 weight/percent/ad_weight_percent.install \ad_weight_percent_install()
  4. 6.2 weight/percent/ad_weight_percent.install \ad_weight_percent_install()
  5. 7 weight/percent/ad_weight_percent.install \ad_weight_percent_install()

Installation of the ad_weight_percent schema.

File

weight/percent/ad_weight_percent.install, line 12

Code

function ad_weight_percent_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
    default:
      db_query("CREATE TABLE {ad_weight_percent} (\n        tid INT NOT NULL DEFAULT '0',\n        aid INT NOT NULL DEFAULT '0',\n        weight INT(3) NOT NULL DEFAULT '0',\n\n        UNIQUE KEY (tid, aid))");
  }
}