rotor.install in Rotor Banner 5.7
File
rotor.install
View source
<?php
function rotor_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {rotor_item} (\n nid int(10) unsigned NOT NULL,\n file_path varchar(255) NULL,\n PRIMARY KEY (nid));");
drupal_set_message(t('Rotor table created'));
break;
}
}
function rotor_uninstall() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("DROP TABLE {rotor_item};");
variable_del('rotor_max_items');
variable_del('rotor_seconds');
variable_del('rotor_show_tabs');
variable_del('rotor_group_tabs');
drupal_set_message(t('Rotor unistalled'));
break;
}
}