DELETE
FROM josabs_session
WHERE ( time < '1369460026' )
SELECT *
FROM josabs_session
WHERE session_id = '79d4c1cd0959755f7a9f8e39a2bf3b61'
INSERT INTO `josabs_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` )
VALUES ( '79d4c1cd0959755f7a9f8e39a2bf3b61','1369462726','','0','1','0' )
SELECT *
FROM josabs_components
WHERE parent = 0
SELECT folder AS type, element AS name, params
FROM josabs_plugins
WHERE published >= 1
AND access <= 0
ORDER BY ordering
SELECT m.*, c.`option` AS component
FROM josabs_menu AS m
LEFT JOIN josabs_components AS c
ON m.componentid = c.id
WHERE m.published = 1
ORDER BY m.sublevel, m.parent, m.ordering
SELECT template
FROM josabs_templates_menu
WHERE client_id = 0
AND (menuid = 0 OR menuid = 1)
ORDER BY menuid DESC
LIMIT 0, 1
SELECT a.id, a.title, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.attribs, a.urls, a.metakey, a.metadesc, 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(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering
FROM josabs_content AS a
INNER JOIN josabs_content_frontpage AS f
ON f.content_id = a.id
LEFT JOIN josabs_categories AS cc
ON cc.id = a.catid
LEFT JOIN josabs_sections AS s
ON s.id = a.sectionid
LEFT JOIN josabs_users AS u
ON u.id = a.created_by
LEFT JOIN josabs_groups AS g
ON a.access = g.id
WHERE 1
AND a.access <= 0
AND a.state = 1
AND (( cc.published = 1
AND s.published = 1 ) OR ( a.catid = 0
AND a.sectionid = 0 ) )
AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2013-05-25 06:18:46' )
AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2013-05-25 06:18:46' )
ORDER BY f.ordering
LIMIT 0, 9
SELECT a.id, a.title, a.title_alias, a.introtext, a.fulltext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.attribs, a.urls, a.metakey, a.metadesc, 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(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END AS catslug, CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering
FROM josabs_content AS a
INNER JOIN josabs_content_frontpage AS f
ON f.content_id = a.id
LEFT JOIN josabs_categories AS cc
ON cc.id = a.catid
LEFT JOIN josabs_sections AS s
ON s.id = a.sectionid
LEFT JOIN josabs_users AS u
ON u.id = a.created_by
LEFT JOIN josabs_groups AS g
ON a.access = g.id
WHERE 1
AND a.access <= 0
AND a.state = 1
AND (( cc.published = 1
AND s.published = 1 ) OR ( a.catid = 0
AND a.sectionid = 0 ) )
AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2013-05-25 06:18:46' )
AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2013-05-25 06:18:46' )
ORDER BY f.ordering
SELECT id, title, module, position, content, showtitle, control, params
FROM josabs_modules AS m
LEFT JOIN josabs_modules_menu AS mm
ON mm.moduleid = m.id
WHERE m.published = 1
AND m.access <= 0
AND m.client_id = 0
AND ( mm.menuid = 1 OR mm.menuid = 0 )
ORDER BY position, ordering
SELECT guest, usertype, client_id
FROM josabs_session
WHERE client_id = 0
SELECT *
FROM josabs_banner
WHERE showBanner = 1
AND (imptotal = 0 OR impmade < imptotal)
AND catid = 14
ORDER BY sticky DESC, ordering
LIMIT 0, 4
UPDATE josabs_banner
SET impmade = impmade + 1
WHERE bid = 3
UPDATE josabs_banner
SET impmade = impmade + 1
WHERE bid = 4
UPDATE josabs_banner
SET impmade = impmade + 1
WHERE bid = 5
UPDATE josabs_banner
SET impmade = impmade + 1
WHERE bid = 6
SELECT *, RAND() AS ordering
FROM josabs_banner
WHERE showBanner = 1
AND (imptotal = 0 OR impmade < imptotal)
AND cid = 1
AND catid = 33
ORDER BY sticky DESC, ordering
LIMIT 0, 1
UPDATE josabs_banner
SET impmade = impmade + 1
WHERE bid = 8
SELECT a.*, 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 josabs_content AS a
INNER JOIN josabs_categories AS cc
ON cc.id = a.catid
INNER JOIN josabs_sections AS s
ON s.id = a.sectionid
WHERE a.state = 1
AND a.access <= 0
AND cc.access <= 0
AND s.access <= 0
AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2013-05-25 06:18:46' )
AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2013-05-25 06:18:46' )
AND cc.id = 3
AND cc.section = s.id
AND cc.published = 1
AND s.published = 1
ORDER BY a.ordering