aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_pdo.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-05 15:58:28 -0800
committerzotlabs <mike@macgirvin.com>2018-02-05 15:58:28 -0800
commitb41c5f349715abc6ca7db563e3938336bc75974e (patch)
tree31a1ee5a74227c30239bb9d2a10341bbacb8ecec /include/dba/dba_pdo.php
parent05de59d4ad174cb106c3a5b5890732af51730384 (diff)
parent930e1fdbdc798868760f8a4e03f32fc3f42e8bc9 (diff)
downloadvolse-hubzilla-b41c5f349715abc6ca7db563e3938336bc75974e.tar.gz
volse-hubzilla-b41c5f349715abc6ca7db563e3938336bc75974e.tar.bz2
volse-hubzilla-b41c5f349715abc6ca7db563e3938336bc75974e.zip
Merge branch 'master' into z6
Diffstat (limited to 'include/dba/dba_pdo.php')
-rwxr-xr-xinclude/dba/dba_pdo.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php
index f119d8926..a9d824a50 100755
--- a/include/dba/dba_pdo.php
+++ b/include/dba/dba_pdo.php
@@ -15,7 +15,7 @@ class dba_pdo extends dba_driver {
$dsn = $server;
}
else {
- $dsn = $this->driver_dbtype . ':host=' . $server . (intval($port) ? '' : ';port=' . $port);
+ $dsn = $this->driver_dbtype . ':host=' . $server . (intval($port) ? ';port=' . $port : '');
}
$dsn .= ';dbname=' . $db;
@@ -111,6 +111,15 @@ class dba_pdo extends dba_driver {
}
}
+ function use_index($str) {
+ if($this->driver_dbtype === 'pgsql') {
+ return '';
+ }
+ else {
+ return 'USE INDEX( ' . $str . ')';
+ }
+ }
+
function quote_interval($txt) {
if($this->driver_dbtype === 'pgsql') {
return "'$txt'";
@@ -154,4 +163,4 @@ class dba_pdo extends dba_driver {
return 'pdo';
}
-} \ No newline at end of file
+}