/[drupal]/contributions/sandbox/bjaspan/remember_me/remember_me.install
ViewVC logotype

Contents of /contributions/sandbox/bjaspan/remember_me/remember_me.install

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Oct 9 14:38:35 2006 UTC (3 years, 1 month ago) by bjaspan
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
initial revision
1 <?php
2 // $Id: remember_me.install,v 1.1 2006/10/06 15:03:35 bjaspan Exp $
3
4 function remember_me_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 db_query("CREATE TABLE {remember_me} (".
9 "rnd char(32) NOT NULL, ".
10 "uid int unsigned NOT NULL, ".
11 "expires int unsigned NOT NULL, ".
12 "PRIMARY KEY (rnd), ".
13 "INDEX (uid), ".
14 "INDEX (expires) ".
15 ") /*!40100 DEFAULT CHARACTER SET utf8 */;"
16 );
17 break;
18
19 case 'pgsql':
20 db_query("CREATE TABLE {remember_me} (".
21 "rnd char(32) NOT NULL, ".
22 "uid integer unsigned NOT NULL, ".
23 "expires integer unsigned NOT NULL, ".
24 "PRIMARY KEY (rnd) ".
25 "INDEX (uid), ".
26 "INDEX (expires), ".
27 ")"
28 );
29 break;
30 }
31 }

  ViewVC Help
Powered by ViewVC 1.1.2