3 require_once('dbClass.php');
5 function CreateDbClass() {
7 $oDB = new dbClass(); // from dbClass2
9 // What dialect of SQL will we be speaking?
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";
22 // This is where the database connection is made
23 // Uncomment the appropriate line for your database
26 // $oDB->Provider="MySQLremoveserver" // required if MySQL is remote
28 if (DBDRIVER == 'pgsql')
29 return $oDB->PostgreSqlLogon(DBNAME, DBUSER, DBPASS);
30 elseif (DBDRIVER == 'mysql')
31 return $oDB->MySqlLogon(DBNAME, DBUSER, DBPASS);
33 die("Unsupported database driver");
36 // Connect via ODBC to a DSN
37 //return $oDB->OdbcLogon("northwindDSN","Northwind","userid","password");
39 // Connect to Oracle XE
40 // Make sure the Oracle database is loaded with the sample database
41 // $oDB->Provider="MySQLremoveserver" // required if Oracle is remote
42 //return $oDB->OracleLogon("XE","northwind","password");