
01-31-2007, 03:14 PM
|
|
|
Join Date: Oct 2005
Location: Colorado
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by LunaTech
Till TECK gets to this, all you have to do to get this working in 3.6.4 is change what you edit in class_core.php. Instead of the instructions given, replace execute_query in class_core.php with:
Code:
function &execute_query($buffered = true, &$link)
{
$this->connection_recent =& $link;
$this->querycount++;
// start microstats timer
$this->mstimer_start();
$queryresult = $this->functions[$buffered ? 'query' : 'query_unbuffered']($this->sql, $link);
$this->mstimer_stop();
if ($queryresult)
{
// unset $sql to lower memory .. this isn't an error, so it's not needed
$this->sql = '';
return $queryresult;
}
else
{
$this->halt();
// unset $sql to lower memory .. error will have already been thrown
$this->sql = '';
}
}
/**
* vBMicroStats: Query execution time
*
* @return string
*/
var $mstime_total = 0;
var $mstime_before = array();
function mstimer_start()
{
$this->mstime_before[] = microtime();
}
function mstimer_stop($qtime_total = true)
{
$mstime_after = microtime();
$mspage_start = explode(' ', TIMESTART);
$mspage_start = $mspage_start[0] + $mspage_start[1];
$mstime_before = explode(' ', array_pop($this->mstime_before));
$mstime_before = $mstime_before[0] + $mstime_before[1] - $mspage_start;
$mstime_after = explode(' ', $mstime_after);
$mstime_after = $mstime_after[0] + $mstime_after[1] - $mspage_start;
$mstime_taken = $mstime_after - $mstime_before;
if ($qtime_total)
{
$this->mstime_total += $mstime_taken;
}
}
|
Not sure I follow, replace all instances of execute_query with the above code? Thanx
|