forked from extern/egroupware
if only keys is passed to search return only the DISTINCT result-set (was not implemented when only_keys where passed as array)
This commit is contained in:
parent
5339d85c56
commit
69da1000b2
@ -899,6 +899,7 @@ class so_sql
|
||||
if ($only_keys === true)
|
||||
{
|
||||
$colums = implode(',',array_keys($this->db_key_cols));
|
||||
if (!empty($colums)) $colums = ' DISTINCT '.$colums;
|
||||
}
|
||||
elseif (is_array($only_keys))
|
||||
{
|
||||
@ -908,6 +909,7 @@ class so_sql
|
||||
$colums[] = ($db_col = array_search($col,$this->db_cols)) ? $db_col : $col;
|
||||
}
|
||||
$colums = implode(',',$colums);
|
||||
if (!empty($colums)) $colums = ' DISTINCT '.$colums;
|
||||
}
|
||||
elseif (!$only_keys)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user