Статьи, новости и дополнения
SQL=SELECT a.id, a.catid, a.sectionid AS secid, a.title AS atitle, c.title AS ctitle, s.title AS stitle, a.introtext, a.fulltext, a.created, u.name, a.created_by_alias, a.hits, a.access,
CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END AS slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END AS catslug
FROM jos_content AS a
INNER JOIN jos_sections AS s ON s.id = a.sectionid
INNER JOIN jos_categories AS c ON c.id = a.catid
LEFT JOIN jos_users AS u ON u.id = a.created_by
WHERE a.sectionid > 0 AND a.state = 1
AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2021-04-22 13:59:06')
AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2021-04-22 13:59:06')
AND (c.id = 170) AND s.access <= 0 AND c.access <= 0 AND a.access <= 0 AND s.published = 1 AND c.published = 1
ORDER BY a.created DESC LIMIT 0, 4
Обновления шаблонов
MySQL server has gone away SQL=SELECT a.id, a.catid, a.sectionid AS secid, a.title AS atitle, c.title AS ctitle, s.title AS stitle, a.introtext, a.fulltext, a.created, u.name, a.created_by_alias, a.hits, a.access,
CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END AS slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END AS catslug
FROM jos_content AS a
INNER JOIN jos_sections AS s ON s.id = a.sectionid
INNER JOIN jos_categories AS c ON c.id = a.catid
LEFT JOIN jos_users AS u ON u.id = a.created_by
WHERE a.sectionid > 0 AND a.state = 1
AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2021-04-22 13:59:06')
AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2021-04-22 13:59:06')
AND (c.id IN (67,132,133,68,165,71,138,164,128,79,131,134,69,122,121,70,72,123,126,174,162,73,130,175,139,74,75,155,76,158,173,135,129,77,78,127,20,119,163))
AND s.access <= 0 AND c.access <= 0 AND a.access <= 0 AND s.published = 1 AND c.published = 1
ORDER BY a.modified DESC, a.created DESC LIMIT 0, 4