Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge

This commit is contained in:
zotlabs
2018-01-28 21:43:50 -08:00
10 changed files with 59 additions and 47 deletions

View File

@@ -321,6 +321,10 @@ function db_concat($fld, $sep) {
return \DBA::$dba->concat($fld, $sep);
}
function db_use_index($str) {
return \DBA::$dba->use_index($str);
}
/**
* @brief Execute a SQL query with printf style args.
*

View File

@@ -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'";