fix sql error after clear cache, because db class has again type "mysqli" instead of just "mysql"

This commit is contained in:
Ralf Becker 2016-04-27 10:42:31 +00:00
parent 9188e9a0f4
commit bf0d1c47a0

View File

@ -1127,7 +1127,7 @@ class Base
public static function fix_group_by_columns($group_by, &$columns, $table_name, $autoinc_id)
{
$matches = null;
if ($GLOBALS['egw']->db->Type == 'mysql' || !preg_match('/(GROUP BY .*)(HAVING.*|ORDER BY.*)?$/iU', $group_by, $matches))
if (substr($GLOBALS['egw']->db->Type, 0, 5) == 'mysql' || !preg_match('/(GROUP BY .*)(HAVING.*|ORDER BY.*)?$/iU', $group_by, $matches))
{
return $group_by; // nothing to do
}