You are here

referral.install in User Referral 5

Same filename and directory in other branches
  1. 6 referral.install
  2. 7 referral.install

File

referral.install
View source
<?php

function referral_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      $result = db_query("\n        CREATE TABLE {referral} (\n          uid            INT(10) NOT NULL DEFAULT '0',\n          referral_uid   INT(10) NOT NULL DEFAULT '0',\n          created        INT(10) NOT NULL DEFAULT '0',\n          flag           INT(11)          DEFAULT '0',\n          flag_timestamp INT(11),\n          host           VARCHAR(255),\n          http_referer   VARCHAR(255),\n          PRIMARY KEY (uid),\n          KEY (referral_uid)\n          ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
  }
}
function referral_uninstall() {
  db_query("DROP TABLE {referral}");
}

Functions