Better group selection

This commit is contained in:
Michael RICOIS 2017-09-05 10:00:59 +02:00
parent 42b9247f65
commit 4e86171ada

View File

@ -109,7 +109,7 @@ class AdvSlide extends ObjectModel
$groups = array(Configuration::get('ADVSLIDER_DEFAULT_GROUP'));
}
$sql.= ' AND EXISTS(SELECT * FROM `'._DB_PREFIX_.'advslider_group` ag WHERE ag.id_group IN('.join(',', $groups).'))';
$sql.= ' AND adv.`id_slide` IN (SELECT `id_slide` FROM `'._DB_PREFIX_.'advslider_group` ag WHERE ag.id_group IN('.join(',', $groups).'))';
}
// Check date