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:
Klaus Leithoff 2010-04-21 12:14:04 +00:00
parent 5339d85c56
commit 69da1000b2

View File

@ -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)
{