View source
<?php
function session_api_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {session_api} (\n sid int NOT NULL,\n session_id varchar(64) NOT NULL,\n PRIMARY KEY (sid),\n UNIQUE (session_id)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
break;
case 'pgsql':
db_query("CREATE TABLE {session_api} (\n sid int NOT NULL default '0',\n session_id varchar(64) NOT NULL default '0',\n PRIMARY KEY (sid),\n UNIQUE (session_id)\n )");
break;
}
}
function session_api_uninstall() {
db_query("DROP TABLE {session_api}");
}