1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
<?
/*
File name : phpDB.inc
Version : 1.1.0
Author : Joe Thong
Purpose : phpDB General Module. A PHP database wrapper for various database servers. Database results
are flushed automatically by phpDB. Supported database servers are MySQL, MSQL, PostgreSQL,
Microsoft SQL Server and Sybase.
Last modified : 03 Sep 2000
Copyright (c) Joe Thong Chean Fonk.
All rights reserved.
*/
if (!defined("_PHPDB_GENERAL_LAYER")) {
define("_PHPDB_GENERAL_LAYER", 1 );
}
$databaseType = $database_type;
$phpDBRootPath = '.';
function useDB($dbType = "") {
global $phpDBRootPath,$postaci_directory;
switch (strtolower($dbType)) {
case "mysql":
case "msql":
case "postgresql":
case "mssql":
case "sybase":
include("$postaci_directory" . "classes". "/phpDB-" . "$dbType" . ".inc");
break;
case "":
die("$text72");
return false;
default:
die("$text73");
return false;
}
return true;
}
useDB($databaseType);
?>
|