You are here

function ua_logger_install in User Agent Logger 5

Same name and namespace in other branches
  1. 6 ua_logger.install \ua_logger_install()

Implementation of hook_install().

File

./ua_logger.install, line 6

Code

function ua_logger_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE `ua_logger` (\n  \t\t`id` int(10) unsigned zerofill NOT NULL auto_increment,\n  \t\t`xid` int(10) unsigned zerofill default NULL,\n  \t\t`type` enum('node','comment') default NULL,\n  \t\t`ua` char(150) default NULL,\n  \t\tPRIMARY KEY  (`id`)\n\t\t) ENGINE=MyISAM DEFAULT CHARSET=latin1");
      break;
  }
}