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