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

Contents of /contributions/modules/vocab/vocab.install

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


Revision 1.2 - (show annotations) (download) (as text)
Mon Dec 25 17:12:05 2006 UTC (2 years, 11 months ago) by suuch
Branch: MAIN
CVS Tags: DRUPAL-4-7--2-1, HEAD
Changes since 1.1: +12 -0 lines
File MIME type: text/x-php
Cleaned up. Fully 4.7
1 <?php //$Id
2
3 function vocab_install()
4 {
5 switch ($GLOBALS['db_type'])
6 {
7 case 'mysql':
8 case 'mysqli':
9 db_query("CREATE TABLE `{vocab_data}` (
10 `id` int(11) NOT NULL auto_increment,
11 `nid` int(11) NOT NULL default '0',
12 `front` varchar(250) default NULL,
13 `back` varchar(250) default NULL,
14 `imageurl` longtext,
15 PRIMARY KEY (`id`)
16 ) TYPE=MyISAM COMMENT='Data for vocabulary exercises'
17 /*!40100 DEFAULT CHARACTER SET utf8 */;
18 ");
19 }
20 }
21
22 function vocab_update_1(){
23 db_query("
24 CREATE TABLE vocab_labels(
25 nid int( 10 ) ,
26 flabel varchar( 255 ) ,
27 blabel varchar( 255 ) ,
28 PRIMARY KEY ( nid )
29 )/*!40100 DEFAULT CHARACTER SET utf8 */;
30 ");
31 return _system_update_utf8(array('vocab_data'));
32 }
33
34 ?>

  ViewVC Help
Powered by ViewVC 1.1.2