You are here

function rotor_install in Rotor Banner 5.7

Same name and namespace in other branches
  1. 5 rotor.install \rotor_install()
  2. 6.2 rotor.install \rotor_install()
  3. 6 rotor.install \rotor_install()
  4. 7 rotor.install \rotor_install()

Install hook

File

./rotor.install, line 6

Code

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