/[drupal]/contributions/modules/ec_linkpoint/ec_linkpoint.install
ViewVC logotype

Contents of /contributions/modules/ec_linkpoint/ec_linkpoint.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Mon Nov 24 13:55:10 2008 UTC (12 months ago) by webengr
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +48 -0 lines
File MIME type: text/x-php
Initial version of ec_linkpoint
1 <?php
2 // $Id: ec_linkpoint.install
3 /**
4 * E-Commerce LinkPoint module schema
5 */
6 function ec_linkpoint_install() {
7 switch ($GLOBALS['db_type']) {
8 case 'mysql':
9 case 'mysqli':
10 db_query("CREATE TABLE {ec_linkpoint_transaction} (
11 txnid int(11) unsigned NOT NULL default '0',
12 anid varchar(30) NOT NULL default '0',
13 amount decimal(10,2) default '0.00',
14 description text,
15 PRIMARY KEY (anid)
16 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
17 break;
18 case 'pgsql':
19 db_query("CREATE TABLE {ec_linkpoint_transaction} (
20 txnid integer NOT NULL default '0',
21 anid varchar(30) NOT NULL default '0',
22 amount decimal(10,2) unsigned NOT NULL default '0',
23 description longtext,
24 PRIMARY KEY (anid)
25 )");
26
27 break;
28 }
29
30 drupal_set_message(t('E-Commerce: LinkPoint tables have been created.'));
31 }
32
33 //function ec_linkpoint_uninstall() {
34 // // delete the variables we created.
35 // switch ($GLOBALS['db_type']) {
36 // case 'mysql':
37 // case 'mysqli':
38 // $deleted = db_query("DROP TABLE IF EXISTS {ec_linkpoint_transaction}");
39 // break;
40 //
41 // case 'pgsql':
42 // $deleted = db_query('DROP TABLE {ec_linkpoint_transaction}');
43 //;; break;
44 // }
45 //}
46
47 ?>
48

  ViewVC Help
Powered by ViewVC 1.1.2