X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2Ffri%2Fincludes%2Fdatabase.php;fp=fs_selfservice%2Ffri%2Fincludes%2Fdatabase.php;h=ff3d199c0c5d8e9c066add772cde521a5419d781;hb=3a17b276638200475d54201fa62566b7440e819a;hp=0000000000000000000000000000000000000000;hpb=46c6025ca0759b96e5bd16e7ce4b16d4df8a0988;p=freeside.git 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