// Remove bad _SQL_USE_SLAVE_ uses + normalize Db->executeS(), Db->execute() and Db->numRows() names

This commit is contained in:
rMalie
2011-10-10 12:18:56 +00:00
parent 149c814a45
commit 9510337b1d
280 changed files with 1971 additions and 1966 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ class NotificationCore
ORDER BY `id_'.pSQL($type).'` DESC LIMIT 5';
$json = array();
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql) as $key => $value)
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql) as $key => $value)
{
if (isset($value['id_order']))
{
@@ -108,7 +108,7 @@ class NotificationCore
{
if (in_array($type, $this->types))
// We update the last item viewed
return Db::getInstance()->Execute('
return Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'employee`
SET `id_last_'.pSQL($type).'` = (SELECT MAX(`id_'.$type.'`)
FROM `'._DB_PREFIX_.(($type == 'order') ? pSQL($type).'s' : pSQL($type)).'`)