]> git.vanrenterghem.biz Git - www.vanrenterghem.biz.git/blob - phpBB2/includes/db.php
89c18c260c5711b7e80aeef73c915265c43c6e4c
[www.vanrenterghem.biz.git] / phpBB2 / includes / db.php
1 <?php
2 /***************************************************************************
3  *                                 db.php
4  *                            -------------------
5  *   begin                : Saturday, Feb 13, 2001
6  *   copyright            : (C) 2001 The phpBB Group
7  *   email                : support@phpbb.com
8  *
9  *   $Id: db.php,v 1.10.2.3 2005/10/30 15:17:14 acydburn Exp $
10  *
11  *
12  ***************************************************************************/
14 /***************************************************************************
15  *
16  *   This program is free software; you can redistribute it and/or modify
17  *   it under the terms of the GNU General Public License as published by
18  *   the Free Software Foundation; either version 2 of the License, or
19  *   (at your option) any later version.
20  *
21  ***************************************************************************/
23 if ( !defined('IN_PHPBB') )
24 {
25         die("Hacking attempt");
26 }
28 switch($dbms)
29 {
30         case 'mysql':
31                 include($phpbb_root_path . 'db/mysql.'.$phpEx);
32                 break;
34         case 'mysql4':
35                 include($phpbb_root_path . 'db/mysql4.'.$phpEx);
36                 break;
38         case 'postgres':
39                 include($phpbb_root_path . 'db/postgres7.'.$phpEx);
40                 break;
42         case 'mssql':
43                 include($phpbb_root_path . 'db/mssql.'.$phpEx);
44                 break;
46         case 'oracle':
47                 include($phpbb_root_path . 'db/oracle.'.$phpEx);
48                 break;
50         case 'msaccess':
51                 include($phpbb_root_path . 'db/msaccess.'.$phpEx);
52                 break;
54         case 'mssql-odbc':
55                 include($phpbb_root_path . 'db/mssql-odbc.'.$phpEx);
56                 break;
57 }
59 // Make the database connection.
60 $db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
61 if(!$db->db_connect_id)
62 {
63         message_die(CRITICAL_ERROR, "Could not connect to the database");
64 }
66 ?>