empty(group by)
parent
d43256ad58
commit
4748d9aef5
|
@ -432,15 +432,15 @@ class DatabaseMysql implements Database
|
|||
{
|
||||
$sql .= " WHERE $where";
|
||||
}
|
||||
if (isset($options['GROUP BY']))
|
||||
if (!empty($options['GROUP BY']) && $options['GROUP BY'] !== '0')
|
||||
{
|
||||
$sql .= " GROUP BY ".$this->order_option($options['GROUP BY']);
|
||||
}
|
||||
if (isset($options['ORDER BY']))
|
||||
if (!empty($options['ORDER BY']) && $options['GROUP BY'] !== '0')
|
||||
{
|
||||
$sql .= " ORDER BY ".$this->order_option($options['ORDER BY']);
|
||||
}
|
||||
if (isset($options['WITHIN GROUP ORDER BY']))
|
||||
if (!empty($options['WITHIN GROUP ORDER BY']) && $options['WITHIN GROUP GROUP BY'] !== '0')
|
||||
{
|
||||
// Sphinx Search extension
|
||||
$sql .= " WITHIN GROUP ORDER BY ".$this->order_option($options['WITHIN GROUP ORDER BY']);
|
||||
|
|
Loading…
Reference in New Issue