# Wed Oct 29 18:03:47 2008
# Query_time: 2  Lock_time: 0  Rows_sent: 1  Rows_examined: 2
use theclari_clarionReport;
SELECT   wp_posts.* FROM wp_posts  WHERE 1=1  AND YEAR(post_date)='2008' AND MONTH(post_date)='10' AND DAYOFMONTH(post_date)='27' AND post_name = 'looking-back-and-looking-ahead-october-27-2008' AND (post_type = 'post')  ORDER BY post_date DESC

# Wed Oct 29 18:29:49 2008
# Query_time: 4  Lock_time: 0  Rows_sent: 1  Rows_examined: 0
use theclari_rugProd;
SELECT a.*, u.name AS author, u.usertype, cc.title AS category, s.title AS section, 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, g.name AS groups, s.published AS sec_pub, cc.published AS cat_pub, s.access AS sec_access, cc.access AS cat_access  FROM jos_content AS a LEFT JOIN jos_categories AS cc ON cc.id = a.catid LEFT JOIN jos_sections AS s ON s.id = cc.section AND s.scope = "content" LEFT JOIN jos_users AS u ON u.id = a.created_by LEFT JOIN jos_groups AS g ON a.access = g.id WHERE a.id = 25 AND a.access <= 0 AND (  ( a.created_by = 0 )    OR  ( a.state = 1 OR a.state = -1) AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2008-10-30 00:29:45' ) AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2008-10-30 00:29:45' ) )

# Wed Oct 29 18:32:22 2008
# Query_time: 2  Lock_time: 0  Rows_sent: 7  Rows_examined: 48
use theclari_rugProd;
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.attribs, a.hits, a.images, a.urls, a.ordering, 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, cc.title AS category, g.name AS groups FROM jos_content AS a INNER JOIN jos_categories AS cc ON cc.id = a.catid LEFT JOIN jos_sections AS s ON s.id = a.sectionid LEFT JOIN jos_users AS u ON u.id = a.created_by LEFT JOIN jos_groups AS g ON a.access = g.id WHERE a.access <= 0 AND s.id = 10 AND s.access <= 0 AND cc.access <= 0 AND s.published = 1 AND cc.published = 1 AND a.state = 1 AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '2008-10-30 00:32:20' ) AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '2008-10-30 00:32:20' ) ORDER BY  a.created DESC LIMIT 0, 7

