SELECT id, home, template, s.params
FROM pcpr1_template_styles as s
LEFT JOIN pcpr1_extensions as e ON e.element=s.template AND e.type='template' AND e.client_id=s.client_id
WHERE s.client_id = 0 AND e.enabled = 1

SELECT a.*, c.accessuserid as cataccessuserid, c.access as cataccess, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug FROM pcpr1_phocagallery AS a LEFT JOIN pcpr1_phocagallery_categories AS c ON c.id = a.catid WHERE a.id = 85 AND a.published > 0 AND a.approved > 0

SELECT a.id, a.filename as filename, b.id AS currentid, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug FROM pcpr1_phocagallery AS a, pcpr1_phocagallery AS b LEFT JOIN pcpr1_phocagallery_categories AS c ON c.id = b.catid WHERE a.catid = 1 AND b.id = 85 AND (a.ordering > b.ordering OR (a.ordering = b.ordering and a.id > b.id)) AND a.published = 1 ORDER BY a.ordering ASC, a.id ASC

SELECT a.id, a.filename as filename, b.id AS currentid, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug FROM pcpr1_phocagallery AS a, pcpr1_phocagallery AS b LEFT JOIN pcpr1_phocagallery_categories AS c ON c.id = b.catid WHERE a.catid = 1 AND b.id = 85 AND (a.ordering < b.ordering OR (a.ordering = b.ordering and a.id < b.id)) AND a.published = 1 ORDER BY a.ordering DESC, a.id DESC

SELECT a.id, a.filename, a.extl, a.description FROM pcpr1_phocagallery AS a LEFT JOIN pcpr1_phocagallery_img_votes_statistics AS r ON r.imgid = a.id WHERE a.catid=1 AND a.published = 1 AND a.approved = 1 ORDER BY a.ordering ASC

SHOW FULL COLUMNS FROM `pcpr1_phocagallery`

UPDATE pcpr1_phocagallery
SET `hits` = (`hits` + 1)
WHERE id = '85'

SELECT params FROM pcpr1_extensions AS e WHERE e.element='com_widgetkit'

17 типов SQL-запросов зафиксировано, отсортировано по вхождениям

Запросы типа SELECT:

2 × SELECT a.id, a.filename as filename, b.id AS currentid, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug FROM pcpr1_phocagallery AS a, pcpr1_phocagallery AS b LEFT JOIN pcpr1_phocagallery_categories AS c ON c.id = b.catid

1 × SELECT a.*, c.accessuserid as cataccessuserid, c.access as cataccess, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug FROM pcpr1_phocagallery AS a LEFT JOIN pcpr1_phocagallery_categories AS c ON c.id = a.catid

1 × SELECT a.id, a.filename, a.extl, a.description FROM pcpr1_phocagallery AS a LEFT JOIN pcpr1_phocagallery_img_votes_statistics AS r ON r.imgid = a.id

1 × SELECT id, home, template, s.params FROM pcpr1_template_styles as s LEFT JOIN pcpr1_extensions as e ON e.element=s.template AND e.type='template' AND e.client_id=s.client_id