SELECT a.*, a.images, cc.alias AS catalias
FROM jos_content AS a
LEFT JOIN jos_content_frontpage AS f
ON f.content_id = a.id
INNER JOIN jos_categories AS cc
ON cc.id = a.catid
INNER JOIN jos_sections AS s
ON s.id = a.sectionid
LEFT JOIN jos_content_rating AS r
ON r.content_id = a.id
WHERE ( a.state = 1
AND a.sectionid > 0 )
AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2024-11-25 08:12:55' )
AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2024-11-25 08:12:55' )
AND a.access <= 0
AND cc.access <= 0
AND s.access <= 0
AND s.published = 1
AND cc.published = 1
AND a.id <> 73
AND ( CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Альголизация,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,озеро,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Зооботсад,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Зоопарк,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Казань,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Татарстан,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Очистка,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Хлорелла,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Реабилитация,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Лебеди,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Энерготехнопром,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Министерство,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Экологии,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Академия Ветеринарной Медицины,%' OR CONCAT(',', REPLACE(a.metakey,', ',','),',') LIKE '%,Ассоциация предприятий малого и среднего бизнеса,%' )
ORDER BY a.hits DESC
LIMIT 0, 6