» Charisma News Online » Strang Report » Standing With Israel » Daily Devotional » Fire In My Bones » New Man eMagazine » Ministry Report » Prophetic Insight from Charisma » Power Up! (For Women) » Christian Retailing Update » Boletín de Vida Cristiana » The Buzz - Music & Reviews
SELECT a.*, SUM( rh.hits ) AS rhhits, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug FROM #__recordhits AS rh LEFT JOIN #__content AS a ON a.id = rh.id_article LEFT JOIN #__content_frontpage AS f ON f.content_id = a.id INNER JOIN #__categories AS cc ON cc.id = a.catid INNER JOIN #__sections AS s ON s.id = a.sectionid WHERE ( a.state = 1 AND s.id > 0 ) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2010-08-19 15:11:07' ) AND ( rh.date >= '2010-08-12' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2010-08-19 15:11:07' ) AND a.access <= 0 AND cc.access <= 0 AND s.access <= 0 AND s.published = 1 AND cc.published = 1 GROUP BY a.id ORDER BY rhhits DESC LIMIT 10