How to add a field in the dataabse with install function for a plugin I am creating.
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: How to add a field in the dataabse with install function for a plugin I am creating.
Maybe Yumi meant something like this:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function forumsignore_install()
{
global $db, $cache;
$db->write_query("ALTER TABLE `".TABLE_PREFIX."forums` ADD `forum_ignore` INT(1) NOT NULL DEFAULT '0'");
$cache->update_forums();
}
function forumsignore_is_installed()
{
global $db;
return $db->field_exists('forum_ignore', 'forums');
}
function forumsignore_uninstall()
{
global $db, $cache;
$db->write_query("ALTER TABLE `".TABLE_PREFIX."forums` DROP `forum_ignore`");
$cache->update_forums();
}


08-06-2010 06:14 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to add a field in the dataabse with install function for a plugin I am creating. - RateU - 08-06-2010 06:14 AM

 Standard Tools
Forum Jump: