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