mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
hstore names / refactoring
This commit is contained in:
18
lib/db.php
18
lib/db.php
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user