SELECT *
FROM ran_session
WHERE session_id = 'vi52m15ep49fuplkq7656fl2p7'
DELETE
FROM ran_session
WHERE ( TIME < '1369344975' )
SELECT *
FROM ran_session
WHERE session_id = 'vi52m15ep49fuplkq7656fl2p7'
INSERT INTO `ran_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` )
VALUES ( 'vi52m15ep49fuplkq7656fl2p7','1369348575','','0','1','0' )
SELECT *
FROM ran_components
WHERE parent = 0
SELECT folder AS TYPE, element AS name, params
FROM ran_plugins
WHERE published >= 1
AND access <= 0
ORDER BY ordering
SELECT m.*, c.`option` AS component
FROM ran_menu AS m
LEFT JOIN ran_components AS c
ON m.componentid = c.id
WHERE m.published = 1
ORDER BY m.sublevel, m.parent, m.ordering
SELECT template
FROM ran_templates_menu
WHERE client_id = 0
AND (menuid = 0 OR menuid = 1)
ORDER BY menuid DESC
LIMIT 0, 1
SELECT id
FROM ran_k2_categories
WHERE published=1
AND trash=0
AND access<=0
SELECT *
FROM ran_k2_items
WHERE id=45
LIMIT 0, 1
SELECT *
FROM ran_k2_categories
WHERE id = '13'
SELECT *
FROM ran_k2_categories
WHERE id = '11'
SELECT tag.*
FROM ran_k2_tags AS tag
JOIN ran_k2_tags_xref AS xref
ON tag.id = xref.tagID
WHERE tag.published=1
AND xref.itemID = 45
ORDER BY xref.id ASC
SELECT COUNT(*)
FROM ran_k2_comments
WHERE itemID=45
AND published=1
SELECT CONCAT( 'search=', `search`, '
replace=', `replace`, '
area=', `area`, '
', `params` )
FROM ran_rereplacer
WHERE published = 1
AND area = 'articles' OR params LIKE '%use_xml=1%'
ORDER BY ordering, id
UPDATE ran_k2_items
SET hits = ( hits + 1 )
WHERE id='45'
SELECT DISTINCT itemID
FROM ran_k2_tags_xref
WHERE tagID IN (257,263,264,265,270,274,284,294,307,315,316,321,332,333,350,359,375,390,392,395,398,402,403,404,405,458,459,460,468,469,478,507)
AND itemID!=45
SELECT i.*, c.alias AS categoryalias
FROM ran_k2_items AS i
LEFT JOIN ran_k2_categories c
ON c.id = i.catid
WHERE i.published = 1
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2013-05-23 22:36:15' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2013-05-23 22:36:15' )
AND i.access <= 0
AND i.trash = 0
AND c.published = 1
AND c.access <= 0
AND c.trash = 0
AND (i.id) IN (66,65,82,68,89,88,79,80,83,85,87,86,81,64,90,67,72,69,99,95,98,92,93,94,96,97,78,77,75,74,59,42,58,48,100,101,129,128,127,126,125,124,123,122,121,118,117,114,116,113,112,111,110,109,107,106,105,104,103,46,44,73,71,70,130,102,91,84,131,47,132,133,134,135,137,138,115,43,145,136,180,181,183,184,185,187,189,191,192,177,178,194,195,198,199)
ORDER BY i.created DESC
LIMIT 0, 5
SELECT *
FROM ran_k2_categories
WHERE id = '15'
SELECT *
FROM ran_users
WHERE id = '89'
SELECT id, gender, description, image, url, `group`, plugins
FROM ran_k2_users
WHERE userID=89
SELECT COUNT(*)
FROM ran_k2_comments
WHERE itemID=199
AND published=1
SELECT COUNT(*)
FROM ran_k2_comments
WHERE itemID=198
AND published=1
SELECT COUNT(*)
FROM ran_k2_comments
WHERE itemID=195
AND published=1
SELECT COUNT(*)
FROM ran_k2_comments
WHERE itemID=194
AND published=1
SELECT COUNT(*)
FROM ran_k2_comments
WHERE itemID=192
AND published=1
SELECT m.*, am.params AS adv_params
FROM ran_modules AS m
LEFT JOIN ran_advancedmodules AS am
ON am.moduleid = m.id
WHERE m.published = 1
AND m.access <= 0
AND m.client_id = 0
ORDER BY m.ordering, m.id
SELECT DISTINCT
c.id AS ID,
c.name AS name,
c.alias AS alias
FROM
ran_k2_categories AS c
LEFT JOIN
ran_k2_items AS content
ON
c.id = content.catid
WHERE
( c.id = 15 )
AND
c.published = 1
AND
c.access <= 0;
SELECT DISTINCT
cats.name AS cat_name,
cats.alias AS cat_alias,
content.catid AS cat_id,
users.name AS author,
users.email AS author_email,
users.id AS author_id,
content.title AS title,
content.introtext AS text,
content.created AS DATE,
content.publish_up AS date_publish,
content.id AS ID,
content.alias AS alias,
content.hits AS hits,
content_rating.rating_sum AS rating_sum,
content_rating.rating_count AS rating_count,
content.plugins AS plugins
FROM
ran_k2_items AS content
LEFT JOIN
ran_k2_categories AS cats
ON cats.id = content.catid
LEFT JOIN
ran_users AS users
ON users.id = content.created_by
LEFT JOIN
ran_k2_rating AS content_rating
ON content.id = content_rating.itemID
WHERE
content.trash = 0
AND cats.access <= 0
AND content.access <= 0
AND content.published = 1
AND cats.published = 1
AND ( content.publish_up = '0000-00-00 00:00:00' OR content.publish_up <= '2013-05-23 22:36:15' )
AND ( content.publish_down = '0000-00-00 00:00:00' OR content.publish_down >= '2013-05-23 22:36:15' )
AND ( content.catid = 15 )
ORDER BY
RAND()
LIMIT
0,36;
SELECT
content.id AS id,
COUNT(comments.itemID) AS COUNT
FROM
ran_k2_items AS content
LEFT JOIN
ran_k2_comments AS comments
ON comments.itemID = content.id
WHERE
comments.published
AND ( content.id = 138 OR content.id = 137 OR content.id = 191 OR content.id = 77 OR content.id = 201 OR content.id = 112 OR content.id = 74 OR content.id = 59 OR content.id = 102 OR content.id = 113 OR content.id = 124 OR content.id = 117 OR content.id = 126 OR content.id = 194 OR content.id = 100 OR content.id = 104 OR content.id = 200 OR content.id = 109 OR content.id = 133 OR content.id = 178 OR content.id = 122 OR content.id = 135 OR content.id = 132 OR content.id = 123 OR content.id = 170 OR content.id = 130 OR content.id = 199 OR content.id = 110 OR content.id = 68 OR content.id = 118 OR content.id = 67 OR content.id = 81 OR content.id = 111 OR content.id = 196 OR content.id = 131 OR content.id = 116 )
GROUP BY
comments.itemID
;
SELECT i.*, CASE WHEN i.modified = 0 THEN i.created ELSE i.modified END AS lastChanged, c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams
FROM ran_k2_items AS i
LEFT JOIN ran_k2_categories c
ON c.id = i.catid
WHERE i.published = 1
AND i.access <= 0
AND i.trash = 0
AND c.published = 1
AND c.access <= 0
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2013-05-23 22:36:15' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2013-05-23 22:36:15' )
AND i.catid=17
ORDER BY i.created DESC
LIMIT 0, 5
SELECT CONCAT( 'search=', `search`, '
replace=', `replace`, '
area=', `area`, '
', `params` )
FROM ran_rereplacer
WHERE published = 1
AND area = 'articles' OR params LIKE '%use_xml=1%'
ORDER BY ordering, id
SELECT DISTINCT
c.id AS ID,
c.name AS name,
c.alias AS alias
FROM
ran_k2_categories AS c
LEFT JOIN
ran_k2_items AS content
ON
c.id = content.catid
WHERE
( c.id = 14 )
AND
c.published = 1
AND
c.access <= 0;
SELECT DISTINCT
cats.name AS cat_name,
cats.alias AS cat_alias,
content.catid AS cat_id,
users.name AS author,
users.email AS author_email,
users.id AS author_id,
content.title AS title,
content.introtext AS text,
content.created AS DATE,
content.publish_up AS date_publish,
content.id AS ID,
content.alias AS alias,
content.hits AS hits,
content_rating.rating_sum AS rating_sum,
content_rating.rating_count AS rating_count,
content.plugins AS plugins
FROM
ran_k2_items AS content
LEFT JOIN
ran_k2_categories AS cats
ON cats.id = content.catid
LEFT JOIN
ran_users AS users
ON users.id = content.created_by
LEFT JOIN
ran_k2_rating AS content_rating
ON content.id = content_rating.itemID
WHERE
content.trash = 0
AND cats.access <= 0
AND content.access <= 0
AND content.published = 1
AND cats.published = 1
AND ( content.publish_up = '0000-00-00 00:00:00' OR content.publish_up <= '2013-05-23 22:36:15' )
AND ( content.publish_down = '0000-00-00 00:00:00' OR content.publish_down >= '2013-05-23 22:36:15' )
AND ( content.catid = 14 )
ORDER BY
RAND()
LIMIT
0,16;
SELECT
content.id AS id,
COUNT(comments.itemID) AS COUNT
FROM
ran_k2_items AS content
LEFT JOIN
ran_k2_comments AS comments
ON comments.itemID = content.id
WHERE
comments.published
AND ( content.id = 83 OR content.id = 167 OR content.id = 93 OR content.id = 164 OR content.id = 85 OR content.id = 161 OR content.id = 86 OR content.id = 148 OR content.id = 89 OR content.id = 92 OR content.id = 163 OR content.id = 150 OR content.id = 160 OR content.id = 168 OR content.id = 90 OR content.id = 82 )
GROUP BY
comments.itemID
;
SELECT DISTINCT
c.id AS ID,
c.name AS name,
c.alias AS alias
FROM
ran_k2_categories AS c
LEFT JOIN
ran_k2_items AS content
ON
c.id = content.catid
WHERE
( c.id = 15 )
AND
c.published = 1
AND
c.access <= 0;
SELECT DISTINCT
cats.name AS cat_name,
cats.alias AS cat_alias,
content.catid AS cat_id,
users.name AS author,
users.email AS author_email,
users.id AS author_id,
content.title AS title,
content.introtext AS text,
content.created AS DATE,
content.publish_up AS date_publish,
content.id AS ID,
content.alias AS alias,
content.hits AS hits,
content_rating.rating_sum AS rating_sum,
content_rating.rating_count AS rating_count,
content.plugins AS plugins
FROM
ran_k2_items AS content
LEFT JOIN
ran_k2_categories AS cats
ON cats.id = content.catid
LEFT JOIN
ran_users AS users
ON users.id = content.created_by
LEFT JOIN
ran_k2_rating AS content_rating
ON content.id = content_rating.itemID
WHERE
content.trash = 0
AND cats.access <= 0
AND content.access <= 0
AND content.published = 1
AND cats.published = 1
AND ( content.publish_up = '0000-00-00 00:00:00' OR content.publish_up <= '2013-05-23 22:36:15' )
AND ( content.publish_down = '0000-00-00 00:00:00' OR content.publish_down >= '2013-05-23 22:36:15' )
AND ( content.catid = 15 )
AND content.featured = 1
ORDER BY
content.created DESC
LIMIT
0,18;
SELECT
content.id AS id,
COUNT(comments.itemID) AS COUNT
FROM
ran_k2_items AS content
LEFT JOIN
ran_k2_comments AS comments
ON comments.itemID = content.id
WHERE
comments.published
AND ( content.id = 201 OR content.id = 200 OR content.id = 199 OR content.id = 198 OR content.id = 197 OR content.id = 196 OR content.id = 195 OR content.id = 194 OR content.id = 192 OR content.id = 190 OR content.id = 181 OR content.id = 178 OR content.id = 177 OR content.id = 176 OR content.id = 169 OR content.id = 132 OR content.id = 131 OR content.id = 129 )
GROUP BY
comments.itemID
;