aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba/dba_pdo.php
diff options
context:
space:
mode:
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
+}