mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
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)
|
if ($only_keys === true)
|
||||||
{
|
{
|
||||||
$colums = implode(',',array_keys($this->db_key_cols));
|
$colums = implode(',',array_keys($this->db_key_cols));
|
||||||
|
if (!empty($colums)) $colums = ' DISTINCT '.$colums;
|
||||||
}
|
}
|
||||||
elseif (is_array($only_keys))
|
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[] = ($db_col = array_search($col,$this->db_cols)) ? $db_col : $col;
|
||||||
}
|
}
|
||||||
$colums = implode(',',$colums);
|
$colums = implode(',',$colums);
|
||||||
|
if (!empty($colums)) $colums = ' DISTINCT '.$colums;
|
||||||
}
|
}
|
||||||
elseif (!$only_keys)
|
elseif (!$only_keys)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user