From 3a17b276638200475d54201fa62566b7440e819a Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 16 Mar 2008 19:58:33 +0000 Subject: --- fs_selfservice/fri/includes/database.php | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 fs_selfservice/fri/includes/database.php (limited to 'fs_selfservice/fri/includes/database.php') diff --git a/fs_selfservice/fri/includes/database.php b/fs_selfservice/fri/includes/database.php new file mode 100644 index 000000000..ff3d199c0 --- /dev/null +++ b/fs_selfservice/fri/includes/database.php @@ -0,0 +1,72 @@ + 2, + 'portability' => DB_PORTABILITY_LOWERCASE|DB_PORTABILITY_RTRIM|DB_PORTABILITY_DELETE_COUNT|DB_PORTABILITY_NUMROWS|DB_PORTABILITY_ERRORS|DB_PORTABILITY_NULL_TO_EMPTY, + ); + + // attempt connection + $dbh = DB::connect($datasource,$options); + + // if connection failed show error + if(DB::isError($dbh)) { + $_SESSION['ari_error'] .= $dbh->getMessage() . "

"; + return; + } + return $dbh; + } +} + + +?> \ No newline at end of file -- cgit v1.2.1