You are here

function referral_install in User Referral 5

Same name and namespace in other branches
  1. 6 referral.install \referral_install()
  2. 7 referral.install \referral_install()

File

./referral.install, line 3

Code

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;
  }
}