SELECT navigator__module_banners.*, navigator__module_banners_types.template
FROM navigator__module_banners
INNER JOIN navigator__module_banners_types
ON navigator__module_banners.type_id = navigator__module_banners_types.type_id
WHERE (category_id = "2") AND (expires > '2024-06-03 06:42:05' or isnull(expires))
AND (max_impressions = 0 OR num_impressions < max_impressions) ORDER BY RAND() LIMIT 0,1
|
|