Well hook_insatll is not recognising my module hook function the defination is bello
please suggest Error?
function annote_install() {
$success = TRUE;
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$success = $success && db_query("CREATE TABLE if not exists {chekOut} (
uid int(10) NOT NULL default 0,
nid int(10) NOT NULL default 0,
note longtext NOT NULL,
timestamp int(10) NOT NULL default 0,
PRIMARY KEY(uid,nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */"
);
break;
}
if ($success) {
drupal_set_message(t('Chelout module installed module tables successfully.'));
}
else {
drupal_set_message(t('The installation of Chelout module was unsuccessful.'), 'error');
}
}
Comments
A couple of thoughts One,
A couple of thoughts
One, the function must reflect the module name, annote_install would suggest your module is named annote but the messages suggest the module is called chelout.
Two, if you installed the module without having annote_install defined and added that later you will need to uninstall the module. You will need to do this manually (remove entry from system table) or you can define annote_uninstall() (which should remove the table, but initially do nothing) and then you can disable and uninstall from the module administration page.