Too many SQL queries, why?
-
JeremyBASS
Re: Too many SQL queries, why?
@Calguy so when is the 1.3 looking to be out... I updated to 1.2.4 nothing changed... tried the function.cms_selflink.php suggestion.... didn't work... if there are anything else that you could suggest that would be great... thanks for you time 
-
Sonya
Re: Too many SQL queries, why?
I have just made a small benchmark 
1. Default install CMSMS 1.2.4 - 30 queries on the frontpage
2. Default install CMSMS 1.2.4 + FrontEndUsers 1.4.2 installed (User NOT logged) - 35 queries
3. Default install CMSMS 1.2.4 + FrontEndUsers 1.4.2 installed (User logged) - 52(!) queries
I've just created one user group and one required property for FEUsers. Nothing more.
So there are 17 queries more for logged user. I am going to see in the module to figure out where the bug is. But I am not a developer and am not able to commit changes if I figure out the problem.
1. Default install CMSMS 1.2.4 - 30 queries on the frontpage
2. Default install CMSMS 1.2.4 + FrontEndUsers 1.4.2 installed (User NOT logged) - 35 queries
3. Default install CMSMS 1.2.4 + FrontEndUsers 1.4.2 installed (User logged) - 52(!) queries
I've just created one user group and one required property for FEUsers. Nothing more.
So there are 17 queries more for logged user. I am going to see in the module to figure out where the bug is. But I am not a developer and am not able to commit changes if I figure out the problem.
-
Sonya
Re: Too many SQL queries, why?
For module developer:
The problem is ExpireUsers() function. This function is executed 5 times with 2-3 queries pro page if user is logged (maximum n queries because of insert made in while for each user session expired). This function is called in LoggedInId().
The latter function is executed 5 times too and produces 1 to 4 queries (maximum 20 queries if cookie feature is enabled in FEUser module).
The problem is ExpireUsers() function. This function is executed 5 times with 2-3 queries pro page if user is logged (maximum n queries because of insert made in while for each user session expired). This function is called in LoggedInId().
The latter function is executed 5 times too and produces 1 to 4 queries (maximum 20 queries if cookie feature is enabled in FEUser module).
Last edited by Sonya on Tue May 13, 2008 12:43 pm, edited 1 time in total.
-
Sonya
Re: Too many SQL queries, why?
If I track the logged user_id in $_SESSION I manage to reduce the number of queries for logged user for the whole page to 36 queries (one more than for not registered user and just 6 more than in default installation).
The quick and dirty patch is:
open FrontEndUsers.api.php
replace function LoggedInId() with
replace function Logout() with
The quick and dirty patch is:
open FrontEndUsers.api.php
replace function LoggedInId() with
Code: Select all
// userid api function
function LoggedInId()
{
if (isset($_SESSION['feuser'])) {
return $_SESSION['feuser'];
}
$db =& $this->GetDb();
$sessionid = session_id();
$this->ExpireUsers();
if( $sessionid == "" )
{
return false;
}
$q="SELECT * FROM ".cms_db_prefix()."module_feusers_loggedin WHERE sessionid=?";
$p=array($sessionid);
$result=$db->Execute($q,$p);
if ($result && $result->RecordCount())
{
$row=$result->FetchRow();
$retval = $row["userid"];
// now touch the lastused
// this will ensure that every time we check that a user is
// logged in, it touches his logged in entry
$q = "UPDATE ".cms_db_prefix()."module_feusers_loggedin SET lastused = ? where sessionid = ?";
$result = $db->Execute( $q, array( time(), $sessionid ) );
$_SESSION['feuser'] = $retval;
return $retval;
}
else
{
$module =& $this->GetModule();
if( $module->GetPreference('cookie_keepalive',0) &&
isset($_COOKIE['feu_sessionid']) )
{
// no session id, but we have a cookie, so what we'll do
// is first check to see if the session is still logged in
// if it is, force a logout for that session id
// and start a new record, otherwise, ignore the cookie
$uid = $_COOKIE['feu_uid'];
$sessionid = $_COOKIE['feu_sessionid'];
/* deleted, this is ambigious since we already know that user is not logged,
cookie set twice and only second function is considered
$q = "SELECT userid FROM ".cms_db_prefix()."module_feusers_loggedin
WHERE sessionid = ?";
$row = $db->GetRow($q, array($sessionid) );
if( !$row )
{
// user has a cookie, but the record has probably expired
// so the cookie is not good any more.
// delete the cookie
@setcookie('feu_sessionid','',time()-60000);
@setcookie('feu_uid','',time()-60000);
return false;
}*/
// delete the existing record
$q = "DELETE FROM ".cms_db_prefix()."module_feusers_loggedin
WHERE sessionid = ?";
$db->Execute( $q, array( $sessionid ) );
// log the user in
// todo, log this too,
// rationalize this code with Login() and Logout() methods
@session_start();
$sessionid = session_id();
$q = "INSERT INTO ".cms_db_prefix()."module_feusers_loggedin
(sessionid,lastused,userid)
VALUES (?,?,?)";
$db->Execute( $q, array($sessionid, time(), $uid) );
// set the cookie again
$expirytime = $module->GetPreference('user_session_expires');
@setcookie('feu_sessionid',$sessionid,time()+$expirytime);
@setcookie('feu_uid',$uid,time()+$expirytime);
$_SESSION['feuser'] = $uid;
return true;
}
else
{
return false;
}
}
return false;
}Code: Select all
// userid api function
function Logout($uid = '')
{
unset($_SESSION['feuser']);
if( !$uid ) return;
$db =& $this->GetDb();
$q = '';
$p = '';
if( $uid == '' )
{
$uid = $this->LoggedInId();
if( !$uid ) return false;
$q="DELETE FROM ".cms_db_prefix()."module_feusers_loggedin WHERE sessionid=?";
$p=array(session_id());
}
else
{
$q="DELETE FROM ".cms_db_prefix()."module_feusers_loggedin WHERE userid=?";
$p=array($uid);
}
$result=$db->Execute($q,$p);
// delete the cookie
@setcookie('feu_sessionid','',time()-60000);
@setcookie('feu_uid','',time()-60000);
// and add history info
$ip = getenv("REMOTE_ADDR");
$q = "INSERT INTO ".cms_db_prefix()."module_feusers_history VALUES (?,?,?,?,?)";
$db->Execute( $q, array( $uid, session_id(), 'logout',
trim($db->DBTimeStamp(time()),"'"),$ip ));
}
Last edited by Sonya on Tue May 13, 2008 2:12 pm, edited 1 time in total.
-
Pierre M.
Re: Too many SQL queries, why?
Hello Sonya,
Please submit your patch in the forge of FEU for review.
Pierre M.
but you have managed to cut down the number of queries from 52 to 36. Congrats !Sonya wrote: But I am not a developer and am not able to commit changes if I figure out the problem.
Please submit your patch in the forge of FEU for review.
Pierre M.
-
JeremyBASS
Re: Too many SQL queries, why?
Ok So, when a user is not logged in i get ~60, so by doing what you have suggested i should end up with ~59 not logged in? I see that while logged in this would be very helpful by the number i put up are while not logged in 
-
Sonya
Re: Too many SQL queries, why?
Sorry, did not understand what do you mean?JeremyBASS wrote: Ok So, when a user is not logged in i get ~60, so by doing what you have suggested i should end up with ~59 not logged in? I see that while logged in this would be very helpful by the number i put up are while not logged in![]()
-
JeremyBASS
Re: Too many SQL queries, why?
Sorry there, 60 is the count for when a user is not logged in... if I understand your suggestion... it would fix when a user is loged in ... right?
-
Sonya
Re: Too many SQL queries, why?
Yes.JeremyBASS wrote: Sorry there, 60 is the count for when a user is not logged in... if I understand your suggestion... it would fix when a user is loged in ... right?
Your debug output here http://forum.cmsmadesimple.org/index.ph ... #msg106324 has another problem. This part seems to be abnormal:
Code: Select all
Debug: (1.88818) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '66' ORDER BY hierarchy<br>
Error (0): <br>
Debug: (1.889885) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '69' ORDER BY hierarchy<br>
Error (0): <br>
Debug: (1.892692) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '67'<br>
Error (0): <br>
Debug: (1.893828) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '67' ORDER BY hierarchy<br>
Error (0): <br>
Debug: (1.895037) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '56'<br>
Error (0): <br>
Debug: (1.899987) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '56' ORDER BY hierarchy<br>
Error (0): <br>
Debug: (1.902269) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '58'<br>
Error (0): <br>
Debug: (1.903514) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '58' ORDER BY hierarchy<br>
Error (0): <br>
Debug: (1.905692) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '64'<br>
Error (0): <br>
Debug: (1.920967) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '65'<br>
Error (0): <br>
Debug: (1.922513) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '65' ORDER BY hierarchy<br>
Error (0): <br>
Debug: (1.923735) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '75'<br>
Error (0): <br>
Debug: (1.925297) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '76'<br>
Error (0): <br>
Debug: (1.926331) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '88'<br>
Error (0): <br>
Debug: (1.941455) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '103'<br>
Error (0): <br>
Debug: (1.953902) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '104'<br>
Error (0): <br>
Debug: (1.955041) <br>
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '107'<br>
Error (0): <br>
-
JeremyBASS
Re: Too many SQL queries, why?
lol... thats what i was saying... nothing in the content area calls out.... it's just one content html blob... At first i thought that it was the menu... but even that would make sense on why there is so many queries... any ideas?
-
vilkis
Re: Too many SQL queries, why?
Your problem is not those queries. They take only 0.07 seconds.
-
Sonya
Re: Too many SQL queries, why?
I would remove all UTDs and Modules from template and see if the problem disappears. Then place UTD one after another and watch debug after each step to see if the problem appears again. What about StyleSwitcher? Could it be the problem?JeremyBASS wrote: any ideas?
-
Sonya
Re: Too many SQL queries, why?
How did you figure the time (0.07 seconds) out?vilkis wrote: Your problem is not those queries. They take only 0.07 seconds.
EDIT: 1.955041 - 1.88818 = 0.066861
I was a little bit blind
Last edited by Sonya on Tue May 13, 2008 6:13 pm, edited 1 time in total.
-
Sonya
Re: Too many SQL queries, why?
Jeremy, vilkis comment has opened my eyesvilkis wrote: Your problem is not those queries. They take only 0.07 seconds.
This query takes more than 1 second.
Code: Select all
SELECT * FROM StJoe_CMS_modules WHERE admin_only = 0 ORDER BY module_name-
JeremyBASS
Re: Too many SQL queries, why?
@Sonya the StyleSwitcher only accounts for one... try that and it droped by one... I'll try the take one out and put it back...
the big time sucks seems to be here
and
I'll try to take out the this is with most of globals out...
the big time sucks seems to be here
Code: Select all
Debug: (0.131509) <br>
(mysql): SELECT * FROM StJoe_CMS_modules WHERE admin_only = 0 ORDER BY module_name<br>
Error (0): <br>
Debug display of 'End of include':(1.180898)
Debug display of 'Load Content Operations':(1.181226)
Debug display of 'End Load Content Operations':(1.188596) Code: Select all
Debug: (1.266585) <br>
(mysql): SELECT eh.tag_name, eh.module_name, e.originator, e.event_name, eh.handler_order, eh.handler_id, eh.removable FROM StJoe_CMS_event_handlers eh
INNER JOIN StJoe_CMS_events e ON e.event_id = eh.event_id
ORDER BY eh.handler_order ASC<br>
Error (0): <br>
Debug: (1.54931) <br>
(mysql): SELECT DISTINCT media_type FROM StJoe_CMS_css c, StJoe_CMS_css_assoc
WHERE css_id = assoc_css_id
AND assoc_type = 'template'
AND assoc_to_id = '17'<br>
Error (0): <br>
I'll try to take out the this is with most of globals out...
Generated in 2.216632 seconds by CMS Made Simple using 78 SQL queries and n/a bytes of memory
Debug: (0.035163) loading smarty
Debug: (0.04073) loading adodb
Debug: (0.049518) loading page functions
Debug: (0.058869) loading content functions
Debug: (0.066632) loading pageinfo functions
Debug: (0.071653) loading translation functions
Debug: (0.074073) loading events functions
Debug: (0.077826) done loading files
Debug: (0.103321)
(mysql): SELECT sitepref_name, sitepref_value from StJoe_CMS_siteprefs
Error (0):
Debug: (0.164589)
(mysql): SELECT * FROM StJoe_CMS_userplugins
Error (0):
Debug: (0.185371)
(mysql): SELECT * FROM StJoe_CMS_modules WHERE admin_only = 0 ORDER BY module_name
Error (0):
Debug display of 'End of include':(1.015373)
Debug: (1.016651)
(mysql): SELECT c.content_id, c.content_name, c.content_alias, c.menu_text, c.titleattribute, c.hierarchy, c.metadata, c.id_hierarchy, c.prop_names, c.create_date AS c_create_date, c.modified_date AS c_date, c.cachable, c.last_modified_by,t.template_id, t.encoding, t.modified_date AS t_date FROM StJoe_CMS_templates t INNER JOIN StJoe_CMS_content c ON c.template_id = t.template_id WHERE c.content_alias = 'test_area' AND c.active = 1
Error (0):
Debug: (1.017058)
(mysql): SELECT MAX(modified_date) AS thedate FROM StJoe_CMS_content c
Error (0):
Debug display of 'Load Content Operations':(1.017404)
Debug display of 'End Load Content Operations':(1.026629)
Debug: (1.03544)
(mysql): SELECT template_id, template_name, template_content, stylesheet, encoding, active, default_template, modified_date FROM StJoe_CMS_templates WHERE template_id = '25'
Error (0):
Debug: (1.056962)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.057432)
(mysql): DELETE FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.05793)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE sessionid='045926d6b22c78ace03abb3d614bdf60'
Error (0):
Debug: (1.058504)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.059043)
(mysql): DELETE FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.059494)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE sessionid='045926d6b22c78ace03abb3d614bdf60'
Error (0):
Debug: (1.059986)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.06038)
(mysql): DELETE FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.060783)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE sessionid='045926d6b22c78ace03abb3d614bdf60'
Error (0):
Debug: (1.061218)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_belongs WHERE userid=0
Error (0):
Debug: (1.061659)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.062667)
(mysql): DELETE FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.063415)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE sessionid='045926d6b22c78ace03abb3d614bdf60'
Error (0):
Debug: (1.06673)
(mysql): SELECT eh.tag_name, eh.module_name, e.originator, e.event_name, eh.handler_order, eh.handler_id, eh.removable FROM StJoe_CMS_event_handlers eh
INNER JOIN StJoe_CMS_events e ON e.event_id = eh.event_id
ORDER BY eh.handler_order ASC
Error (0):
Debug display of 'Start Loading Hierarchy Manager':(1.344271)
Debug display of 'starting tree':(1.344326)
Debug: (1.348119) file needs loading
Debug: (1.354184)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = -1 ORDER BY hierarchy
Error (0):
Debug display of 'ending tree':(1.358602)
Debug display of 'End Loading Hierarchy Manager':(1.358668)
Debug: (1.361383)
(mysql): SELECT * FROM StJoe_CMS_content WHERE default_content = 1
Error (0):
Debug: (1.362145)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '52'
Error (0):
Debug: (1.366967)
(mysql): SELECT * FROM StJoe_CMS_content WHERE default_content = 1
Error (0):
Debug: (1.368406)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '105'
Error (0):
Debug: (1.37089)
(mysql): SELECT * FROM StJoe_CMS_content WHERE default_content = 1
Error (0):
Debug: (1.374307)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '108'
Error (0):
Debug: (1.387339)
(mysql): SELECT * FROM StJoe_CMS_content WHERE default_content = 1
Error (0):
Debug: (1.447921)
(mysql): SELECT content from StJoe_CMS_module_templates WHERE module_name = 'Search' and template_name = 'displaysearch'
Error (0):
Debug: (1.449163)
(mysql): SELECT modified_date from StJoe_CMS_module_templates WHERE module_name = 'Search' and template_name = 'displaysearch'
Error (0):
Debug: (1.549599)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.551031)
(mysql): DELETE FROM StJoe_CMS_module_feusers_loggedin WHERE lastused<1210701118
Error (0):
Debug: (1.551652)
(mysql): SELECT * FROM StJoe_CMS_module_feusers_loggedin WHERE sessionid='045926d6b22c78ace03abb3d614bdf60'
Error (0):
Debug: (1.552449)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_alias = 'login'
Error (0):
Debug: (1.552565) start findNodeByTag
Debug: (1.553407) end findNodeByTag
Debug: (1.557912)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '72'
Error (0):
Debug: (1.558403) start findNodeByTag
Debug: (1.559683) end findNodeByTag
Debug: (1.561252)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '107'
Error (0):
Debug: (1.562846)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_alias = 'Home'
Error (0):
Debug display of 'Start of Menu Manager Display':(1.565044)
Debug: (1.566084)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '53'
Error (0):
Debug: (1.567519)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '53' ORDER BY hierarchy
Error (0):
Debug: (1.575696)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '87' ORDER BY hierarchy
Error (0):
Debug: (1.578355) load properties called
Debug: (1.579024)
(mysql): SELECT * FROM StJoe_CMS_content_props WHERE content_id = '143'
Error (0):
Debug: (1.580147)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '66'
Error (0):
Debug: (1.581219)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '66' ORDER BY hierarchy
Error (0):
Debug: (1.582877)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '69' ORDER BY hierarchy
Error (0):
Debug: (1.584224)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '67'
Error (0):
Debug: (1.585244)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '67' ORDER BY hierarchy
Error (0):
Debug: (1.586393)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '56'
Error (0):
Debug: (1.587372)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '56' ORDER BY hierarchy
Error (0):
Debug: (1.589682)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '58'
Error (0):
Debug: (1.590837)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '58' ORDER BY hierarchy
Error (0):
Debug: (1.593156)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '64'
Error (0):
Debug: (1.594181)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '65'
Error (0):
Debug: (1.596275)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '65' ORDER BY hierarchy
Error (0):
Debug: (1.59803)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '75'
Error (0):
Debug: (1.599941)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '76'
Error (0):
Debug: (1.601476)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '88'
Error (0):
Debug: (1.602441)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '103'
Error (0):
Debug: (1.604049)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '103' ORDER BY hierarchy
Error (0):
Debug: (1.606755)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '118' ORDER BY hierarchy
Error (0):
Debug: (1.607091) load properties called
Debug: (1.607838)
(mysql): SELECT * FROM StJoe_CMS_content_props WHERE content_id = '142'
Error (0):
Debug: (1.609729)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '104'
Error (0):
Debug: (1.611324)
(mysql): SELECT * FROM StJoe_CMS_content WHERE parent_id = '108' ORDER BY hierarchy
Error (0):
Debug: (1.612537)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_id = '109'
Error (0):
Debug: (1.618446)
(mysql): SELECT content from StJoe_CMS_module_templates WHERE module_name = 'MenuManager' and template_name = 'tempCSS'
Error (0):
Debug: (1.62112)
(mysql): SELECT modified_date from StJoe_CMS_module_templates WHERE module_name = 'MenuManager' and template_name = 'tempCSS'
Error (0):
Debug display of 'End of Menu Manager Display':(1.746319)
Debug: (1.751481)
(mysql): SELECT * FROM StJoe_CMS_content WHERE content_alias = 'news'
Error (0):
Debug: (1.751657) start findNodeByTag
Debug: (1.752014) end findNodeByTag
Debug: (1.752943)
(mysql):
SELECT count(mn.news_id) as count
FROM StJoe_CMS_module_news mn
LEFT OUTER JOIN StJoe_CMS_module_news_categories mnc
ON mnc.news_category_id = mn.news_category_id
LEFT OUTER JOIN StJoe_CMS_users u
ON u.user_id = mn.author_id
WHERE
status = 'published'
AND
( IFNULL(start_time, '1969-12-31 19:00:01') < '2008-05-13 14:21:58') AND (( IFNULL(end_time, '1969-12-31 19:00:01') = '1969-12-31 19:00:01') OR (end_time > '2008-05-13 14:21:58'))
Error (0):
Debug: (1.776814)
(mysql):
SELECT
mn.*,
mnc.news_category_name,
mnc.long_name,
u.username,
u.first_name,
u.last_name
FROM StJoe_CMS_module_news mn
LEFT OUTER JOIN StJoe_CMS_module_news_categories mnc
ON mnc.news_category_id = mn.news_category_id
LEFT OUTER JOIN StJoe_CMS_users u
ON u.user_id = mn.author_id
WHERE
status = 'published'
AND
( IFNULL(start_time, '1969-12-31 19:00:01') < '2008-05-13 14:21:58') AND (( IFNULL(end_time, '1969-12-31 19:00:01') = '1969-12-31 19:00:01') OR (end_time > '2008-05-13 14:21:58')) ORDER BY news_date desc LIMIT 0, 1
Error (0):
Debug: (1.777404)
(mysql): SELECT A.value,B.id,B.name,B.type FROM StJoe_CMS_module_news_fieldvals A, StJoe_CMS_module_news_fielddefs B WHERE A.fielddef_id = B.id AND B.public = 1 AND A.news_id = '2' ORDER BY B.item_order
Error (0):
Debug: (1.801578)
(mysql): SELECT content from StJoe_CMS_module_templates WHERE module_name = 'News' and template_name = 'summarySample'
Error (0):
Debug: (1.802077)
(mysql): SELECT modified_date from StJoe_CMS_module_templates WHERE module_name = 'News' and template_name = 'summarySample'
Error (0):
Debug: (1.942478)
(mysql): SELECT * from StJoe_CMS_module_templates WHERE module_name = 'Printing' and template_name = 'linktemplate'
Error (0):
Debug: (1.944533)
(mysql): SELECT content from StJoe_CMS_module_templates WHERE module_name = 'Printing' and template_name = 'linktemplate'
Error (0):
Debug: (1.944963)
(mysql): SELECT modified_date from StJoe_CMS_module_templates WHERE module_name = 'Printing' and template_name = 'linktemplate'
Error (0):
Debug: (1.99079) start findNodeByTag
Debug: (1.99167) end findNodeByTag
Debug: (1.991856) load properties called
Debug: (1.992744)
(mysql): SELECT * FROM StJoe_CMS_content_props WHERE content_id = '107'
Error (0):
Debug: (1.992869) load properties called
Debug: (1.993503)
(mysql): SELECT * FROM StJoe_CMS_content_props WHERE content_id = '107'
Error (0):
Debug: (2.050872)
(mysql): SELECT * FROM StJoe_CMS_content WHERE default_content = 1
Error (0):
Debug: (2.053531)
(mysql): SELECT * FROM StJoe_CMS_content WHERE default_content = 1
Error (0):
