You are here

ua_logger.install in User Agent Logger 5

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

File

ua_logger.install
View source
<?php

/**
 * Implementation of hook_install().
 */
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;
  }
}

Functions

Namesort descending Description
ua_logger_install Implementation of hook_install().