- 1
- 2
- 3
- 4
SELECT DISTINCT relation.itemid, relation.catid, title, owner, image, background, icon, metadesc, publish_up FROM `mh_sobi2_cat_items_relations` AS relation LEFT JOIN
`mh_sobi2_item` AS items ON relation.itemid = items.itemid WHERE (`published` = '1' AND (relation.catid > 1) AND (`publish_down` > '2011-07-28 05:11:50' OR `publish_
down` = '0000-00-00 00:00:00' ) AND items.itemid IN(228 , 2091 , 4532 , 4843 , 5255 , 5583 , 13 , 15 , 3553 , 40 , 41 ... еще ~ 5000 элементов)
GROUP BY items.itemid ORDER BY items.publish_up DESC LIMIT 0, 12;
Такой вот запрос формирует компонент для joomla который называется sobi2