hstore names / refactoring

This commit is contained in:
Brian Quinion
2010-10-27 14:05:42 +00:00
parent 32fc283d37
commit 57583f09e3
6 changed files with 1185 additions and 90 deletions

View File

@@ -1,15 +1,19 @@
<?php
require_once('DB.php');
// Get the database object
$oDB =& DB::connect(CONST_Database_DSN, false);
if (PEAR::IsError($oDB))
function &getDB()
{
fail($oDB->getMessage(), 'Unable to connect to the database');
// Get the database object
$oDB =& DB::connect(CONST_Database_DSN, false);
if (PEAR::IsError($oDB))
{
fail($oDB->getMessage(), 'Unable to connect to the database');
}
$oDB->setFetchMode(DB_FETCHMODE_ASSOC);
$oDB->query("SET DateStyle TO 'sql,european'");
$oDB->query("SET client_encoding TO 'utf-8'");
return $oDB;
}
$oDB->setFetchMode(DB_FETCHMODE_ASSOC);
$oDB->query("SET DateStyle TO 'sql,european'");
$oDB->query("SET client_encoding TO 'utf-8'");
function getDBQuoted($s)
{