2 require_once('DB.php');
4 // Get the database object
5 $oDB =& DB::connect(CONST_Database_DSN, false);
6 if (PEAR::IsError($oDB))
8 fail($oDB->getMessage(), 'Unable to connect to the database');
10 $oDB->setFetchMode(DB_FETCHMODE_ASSOC);
11 $oDB->query("SET DateStyle TO 'sql,european'");
12 $oDB->query("SET client_encoding TO 'utf-8'");
14 function getDBQuoted($s)
16 return "'".pg_escape_string($s)."'";