[-] BO: Fix SQL error on click on notification if no new notifications
This commit is contained in:
1 parent
24ce24426f
commit
73b512359d
1 file changed
+1
-1
@@ -148,7 +148,7 @@ class NotificationCore
|
|||||||
return Db::getInstance()->execute('
|
return Db::getInstance()->execute('
|
||||||
UPDATE `'._DB_PREFIX_.'employee`
|
UPDATE `'._DB_PREFIX_.'employee`
|
||||||
SET `id_last_'.bqSQL($type).'` = (
|
SET `id_last_'.bqSQL($type).'` = (
|
||||||
SELECT MAX(`id_'.$type.'`)
|
SELECT IFNULL(MAX(`id_'.$type.'`), 0)
|
||||||
FROM `'._DB_PREFIX_.(($type == 'order') ? bqSQL($type).'s' : bqSQL($type)).'`
|
FROM `'._DB_PREFIX_.(($type == 'order') ? bqSQL($type).'s' : bqSQL($type)).'`
|
||||||
)
|
)
|
||||||
WHERE `id_employee` = '.(int)$cookie->id_employee);
|
WHERE `id_employee` = '.(int)$cookie->id_employee);
|
||||||
|
|||||||
Reference in new issue
Block a user