function user_relationship_invites_install in User Relationships 5
Same name and namespace in other branches
- 5.2 plugins/user_relationship_invites/user_relationship_invites.install \user_relationship_invites_install()
- 6 user_relationship_invites/user_relationship_invites.install \user_relationship_invites_install()
File
- plugins/
user_relationship_invites/ user_relationship_invites.install, line 3
Code
function user_relationship_invites_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("\n CREATE TABLE {user_relationship_invites} (\n inviter_uid int unsigned NOT NULL default 0,\n rtid int unsigned NOT NULL default 0,\n invite_code varchar(64) NOT NULL default '',\n KEY invite_code (invite_code)\n ) /*!40100 DEFAULT CHARACTER SET utf8*/;\n ");
$success = TRUE;
break;
default:
drupal_set_message(t('Unsupported database.'));
}
if ($success) {
drupal_set_message(t('User Relationship Invite module installed successfully.'));
}
else {
drupal_set_message(t('The installation of the User Relationship Invite module as unsuccessful.'), 'error');
}
}