executeS( 'SELECT `id_ws_customhtml_group` FROM `' . _DB_PREFIX_ . 'ws_customhtml_group` ORDER BY `id_ws_customhtml_group` ASC' ); foreach ($groups as $index => $group) { if (!Db::getInstance()->update( 'ws_customhtml_group', ['ordering' => (int) $index], '`id_ws_customhtml_group` = ' . (int) $group['id_ws_customhtml_group'] )) { return false; } } return true; }