Rename sys_mask.mask into sys_mask.fname
[misc/kostenrechnung] / lib / dbase.php
1 <?php
2
3 require_once('dbClass.php');
4
5 function CreateDbClass() {
6   global $oDB;
7   $oDB = new dbClass();  // from dbClass2
8
9   // What dialect of SQL will we be speaking?
10
11   //$oDB->Dialect="MySQL"  // this is the default, so you can leave it commented
12   //$oDB->Dialect="Oracle";
13   //$oDB->Dialect="TSQL";
14   //$oDB->Dialect="Access";
15   $oDB->Dialect="PostgreSQL";
16   }
17
18 function OpenDB() {
19   global $oDB;
20   CreateDbClass();
21
22   // This is where the database connection is made
23   // Uncomment the appropriate line for your database
24
25   // Using MySQL
26   // $oDB->Provider="MySQLremoveserver"  // required if MySQL is remote
27   return $oDB->PostgreSqlLogon(DBNAME, DBUSER, DBPASS);
28
29   // Connect via ODBC to a DSN
30   //return $oDB->OdbcLogon("northwindDSN","Northwind","userid","password");
31
32   // Connect to Oracle XE
33   // Make sure the Oracle database is loaded with the sample database
34   // $oDB->Provider="MySQLremoveserver"  // required if Oracle is remote
35   //return $oDB->OracleLogon("XE","northwind","password");
36 }
37
38 ?>