33 lines
990 B
Plaintext
33 lines
990 B
Plaintext
<?php
|
|
// $Id$
|
|
|
|
function contact_install() {
|
|
switch ($GLOBALS['db_type']) {
|
|
case 'mysql':
|
|
case 'mysqli':
|
|
db_query("CREATE TABLE {contact} (
|
|
cid int(10) unsigned NOT NULL auto_increment,
|
|
category varchar(255) NOT NULL default '',
|
|
recipients longtext NOT NULL default '',
|
|
reply longtext NOT NULL default '',
|
|
weight tinyint(3) NOT NULL default '0',
|
|
selected tinyint(1) NOT NULL default '0',
|
|
PRIMARY KEY (cid),
|
|
UNIQUE KEY category (category)
|
|
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
|
|
break;
|
|
case 'pgsql':
|
|
db_query("CREATE TABLE {contact} (
|
|
cid serial CHECK (cid >= 0),
|
|
category varchar(255) NOT NULL default '',
|
|
recipients text NOT NULL default '',
|
|
reply text NOT NULL default '',
|
|
weight smallint NOT NULL default '0',
|
|
selected smallint NOT NULL default '0',
|
|
PRIMARY KEY (cid),
|
|
UNIQUE (category)
|
|
)");
|
|
break;
|
|
}
|
|
}
|