2003-03-17 10:54:23 +00:00
|
|
|
<?php
|
2005-04-09 12:26:45 +00:00
|
|
|
/**
|
|
|
|
*
|
2005-08-17 14:29:05 +00:00
|
|
|
* @package dbal
|
2005-04-09 12:26:45 +00:00
|
|
|
* @version $Id$
|
|
|
|
* @copyright (c) 2005 phpBB Group
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-03-19 14:23:21 +00:00
|
|
|
/**
|
2006-10-14 14:56:46 +00:00
|
|
|
* @ignore
|
2006-03-19 14:23:21 +00:00
|
|
|
*/
|
|
|
|
if (!defined('IN_PHPBB'))
|
|
|
|
{
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2006-10-14 14:56:46 +00:00
|
|
|
include_once($phpbb_root_path . 'includes/db/dbal.' . $phpEx);
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2005-04-09 12:26:45 +00:00
|
|
|
/**
|
2005-10-07 23:00:41 +00:00
|
|
|
* Unified ODBC functions
|
|
|
|
* Unified ODBC functions support any database having ODBC driver, for example Adabas D, IBM DB2, iODBC, Solid, Sybase SQL Anywhere...
|
|
|
|
* Here we only support MSSQL Server 2000+ because of the provided schema
|
2007-04-12 16:20:39 +00:00
|
|
|
*
|
|
|
|
* @note number of bytes returned for returning data depends on odbc.defaultlrl php.ini setting.
|
|
|
|
* If it is limited to 4K for example only 4K of data is returned max, resulting in incomplete theme data for example.
|
|
|
|
* @note odbc.defaultbinmode may affect UTF8 characters
|
|
|
|
*
|
2006-06-13 21:06:29 +00:00
|
|
|
* @package dbal
|
2005-04-09 12:26:45 +00:00
|
|
|
*/
|
2005-08-17 14:29:05 +00:00
|
|
|
class dbal_mssql_odbc extends dbal
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-10-07 23:00:41 +00:00
|
|
|
var $last_query_text = '';
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Connect to server
|
|
|
|
*/
|
2007-02-19 04:12:13 +00:00
|
|
|
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
|
|
|
$this->persistency = $persistency;
|
|
|
|
$this->user = $sqluser;
|
2005-01-04 22:07:53 +00:00
|
|
|
$this->server = $sqlserver . (($port) ? ':' . $port : '');
|
2003-03-17 10:54:23 +00:00
|
|
|
$this->dbname = $database;
|
|
|
|
|
2007-06-18 16:21:51 +00:00
|
|
|
@ini_set('odbc.defaultlrl', 65536);
|
#10005, #10003, #10001, #9999, #9945, #9965, #9909, #9906, #9877, #9861, #9831, #9830, #9815, #9665, #9624
prosilver adjustments for important announcements in ucp - #9995
MCP fixes for user notes/warnings - #9981
Preserving imageset values on save/edit
find a member link for Mass PM's - #9925
syndicate window.onload events where necessary - #9878
Duplicate topics in forums with announcements - #9840
Email template for forced re-activation - #9808
Topic pagination adjustment - #9763
Changed compose message layout in UCP - #9706, #9702
Fixed inline attachment font size (hopefully)
git-svn-id: file:///svn/phpbb/trunk@7384 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-04-22 15:27:40 +00:00
|
|
|
|
2005-03-21 23:10:11 +00:00
|
|
|
$this->db_connect_id = ($this->persistency) ? @odbc_pconnect($this->server, $this->user, $sqlpassword) : @odbc_connect($this->server, $this->user, $sqlpassword);
|
2003-06-12 17:11:43 +00:00
|
|
|
|
|
|
|
return ($this->db_connect_id) ? $this->db_connect_id : $this->sql_error('');
|
|
|
|
}
|
|
|
|
|
2006-07-09 16:23:57 +00:00
|
|
|
/**
|
|
|
|
* Version information about used database
|
|
|
|
*/
|
|
|
|
function sql_server_info()
|
|
|
|
{
|
|
|
|
$result_id = @odbc_exec($this->db_connect_id, "SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')");
|
|
|
|
|
|
|
|
$row = false;
|
|
|
|
if ($result_id)
|
|
|
|
{
|
|
|
|
$row = @odbc_fetch_array($result_id);
|
|
|
|
@odbc_free_result($result_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($row)
|
|
|
|
{
|
|
|
|
return 'MSSQL (ODBC)<br />' . implode(' ', $row);
|
|
|
|
}
|
|
|
|
|
|
|
|
return 'MSSQL (ODBC)';
|
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
2006-06-06 20:53:46 +00:00
|
|
|
* SQL Transaction
|
2006-08-22 21:26:06 +00:00
|
|
|
* @access private
|
2005-10-07 23:00:41 +00:00
|
|
|
*/
|
2006-06-06 20:53:46 +00:00
|
|
|
function _sql_transaction($status = 'begin')
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
switch ($status)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
case 'begin':
|
2006-06-06 20:53:46 +00:00
|
|
|
return @odbc_autocommit($this->db_connect_id, false);
|
2006-06-02 13:26:27 +00:00
|
|
|
break;
|
2005-01-04 22:07:53 +00:00
|
|
|
|
|
|
|
case 'commit':
|
|
|
|
$result = @odbc_commit($this->db_connect_id);
|
|
|
|
@odbc_autocommit($this->db_connect_id, true);
|
2006-06-06 20:53:46 +00:00
|
|
|
return $result;
|
2006-06-02 13:26:27 +00:00
|
|
|
break;
|
2005-01-04 22:07:53 +00:00
|
|
|
|
|
|
|
case 'rollback':
|
|
|
|
$result = @odbc_rollback($this->db_connect_id);
|
|
|
|
@odbc_autocommit($this->db_connect_id, true);
|
2006-06-06 20:53:46 +00:00
|
|
|
return $result;
|
2006-06-02 13:26:27 +00:00
|
|
|
break;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
2005-01-04 22:07:53 +00:00
|
|
|
|
2006-06-06 20:53:46 +00:00
|
|
|
return true;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Base query method
|
2006-08-01 16:14:14 +00:00
|
|
|
*
|
|
|
|
* @param string $query Contains the SQL query which shall be executed
|
|
|
|
* @param int $cache_ttl Either 0 to avoid caching or the time in seconds which the result shall be kept in cache
|
|
|
|
* @return mixed When casted to bool the returned value returns true on success and false on failure
|
|
|
|
*
|
|
|
|
* @access public
|
2005-10-07 23:00:41 +00:00
|
|
|
*/
|
2005-01-04 22:07:53 +00:00
|
|
|
function sql_query($query = '', $cache_ttl = 0)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
if ($query != '')
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
global $cache;
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
// EXPLAIN only in extra debug mode
|
|
|
|
if (defined('DEBUG_EXTRA'))
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
$this->sql_report('start', $query);
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
$this->last_query_text = $query;
|
2005-01-04 22:07:53 +00:00
|
|
|
$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false;
|
2006-05-20 13:20:38 +00:00
|
|
|
$this->sql_add_num_queries($this->query_result);
|
2005-01-04 22:07:53 +00:00
|
|
|
|
2006-10-03 20:38:03 +00:00
|
|
|
if ($this->query_result === false)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-10-07 23:00:41 +00:00
|
|
|
if (($this->query_result = @odbc_exec($this->db_connect_id, $query)) === false)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
$this->sql_error($query);
|
|
|
|
}
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
if (defined('DEBUG_EXTRA'))
|
|
|
|
{
|
|
|
|
$this->sql_report('stop', $query);
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
if ($cache_ttl && method_exists($cache, 'sql_save'))
|
|
|
|
{
|
|
|
|
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
|
|
|
$cache->sql_save($query, $this->query_result, $cache_ttl);
|
|
|
|
}
|
2006-03-17 12:51:32 +00:00
|
|
|
else if (strpos($query, 'SELECT') === 0 && $this->query_result)
|
2005-01-04 22:07:53 +00:00
|
|
|
{
|
|
|
|
$this->open_queries[(int) $this->query_result] = $this->query_result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (defined('DEBUG_EXTRA'))
|
|
|
|
{
|
|
|
|
$this->sql_report('fromcache', $query);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
return ($this->query_result) ? $this->query_result : false;
|
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Build LIMIT query
|
|
|
|
*/
|
2007-01-17 18:41:49 +00:00
|
|
|
function _sql_query_limit($query, $total, $offset = 0, $cache_ttl = 0)
|
2006-06-02 13:26:27 +00:00
|
|
|
{
|
2007-01-17 18:41:49 +00:00
|
|
|
$this->query_result = false;
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2007-01-17 18:41:49 +00:00
|
|
|
// Since TOP is only returning a set number of rows we won't need it if total is set to 0 (return all rows)
|
|
|
|
if ($total)
|
|
|
|
{
|
|
|
|
// We need to grab the total number of rows + the offset number of rows to get the correct result
|
|
|
|
if (strpos($query, 'SELECT DISTINCT') === 0)
|
2005-01-04 22:07:53 +00:00
|
|
|
{
|
2007-01-17 18:41:49 +00:00
|
|
|
$query = 'SELECT DISTINCT TOP ' . ($total + $offset) . ' ' . substr($query, 15);
|
2006-05-20 13:20:38 +00:00
|
|
|
}
|
2007-01-17 18:41:49 +00:00
|
|
|
else
|
2006-06-08 20:26:03 +00:00
|
|
|
{
|
2007-01-17 18:41:49 +00:00
|
|
|
$query = 'SELECT TOP ' . ($total + $offset) . ' ' . substr($query, 6);
|
2006-06-08 20:26:03 +00:00
|
|
|
}
|
2006-06-02 13:26:27 +00:00
|
|
|
}
|
2007-01-17 18:41:49 +00:00
|
|
|
|
|
|
|
$result = $this->sql_query($query, $cache_ttl);
|
|
|
|
|
|
|
|
// Seek by $offset rows
|
|
|
|
if ($offset)
|
2006-06-02 13:26:27 +00:00
|
|
|
{
|
2007-01-17 18:41:49 +00:00
|
|
|
$this->sql_rowseek($offset, $result);
|
2006-06-02 13:26:27 +00:00
|
|
|
}
|
2007-01-17 18:41:49 +00:00
|
|
|
|
|
|
|
return $result;
|
2005-01-04 22:07:53 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Return number of affected rows
|
|
|
|
*/
|
2005-01-04 22:07:53 +00:00
|
|
|
function sql_affectedrows()
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-10-07 23:00:41 +00:00
|
|
|
return ($this->db_connect_id) ? @odbc_num_rows($this->query_result) : false;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Fetch current row
|
2007-04-12 16:20:39 +00:00
|
|
|
* @note number of bytes returned depends on odbc.defaultlrl php.ini setting. If it is limited to 4K for example only 4K of data is returned max.
|
2005-10-07 23:00:41 +00:00
|
|
|
*/
|
2007-04-12 16:20:39 +00:00
|
|
|
function sql_fetchrow($query_id = false, $debug = false)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
global $cache;
|
2003-03-17 10:54:23 +00:00
|
|
|
|
2006-10-04 15:15:40 +00:00
|
|
|
if ($query_id === false)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
$query_id = $this->query_result;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
if (isset($cache->sql_rowset[$query_id]))
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
return $cache->sql_fetchrow($query_id);
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
2006-06-02 13:26:27 +00:00
|
|
|
|
2006-10-04 15:15:40 +00:00
|
|
|
return ($query_id !== false) ? @odbc_fetch_array($query_id) : false;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Seek to given row number
|
|
|
|
* rownum is zero-based
|
|
|
|
*/
|
2007-06-12 21:24:22 +00:00
|
|
|
function sql_rowseek($rownum, &$query_id)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2006-08-01 16:14:14 +00:00
|
|
|
global $cache;
|
|
|
|
|
2006-10-04 15:15:40 +00:00
|
|
|
if ($query_id === false)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
$query_id = $this->query_result;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2006-08-01 16:14:14 +00:00
|
|
|
if (isset($cache->sql_rowset[$query_id]))
|
|
|
|
{
|
2006-09-23 11:10:37 +00:00
|
|
|
return $cache->sql_rowseek($rownum, $query_id);
|
2006-08-01 16:14:14 +00:00
|
|
|
}
|
|
|
|
|
2006-10-04 15:15:40 +00:00
|
|
|
if ($query_id === false)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
$this->sql_freeresult($query_id);
|
|
|
|
$query_id = $this->sql_query($this->last_query_text);
|
|
|
|
|
2006-10-04 15:15:40 +00:00
|
|
|
if ($query_id === false)
|
2005-10-07 23:00:41 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row
|
|
|
|
for ($i = 0; $i < $rownum; $i++)
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-10-07 23:00:41 +00:00
|
|
|
if (!$this->sql_fetchrow($query_id))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
2005-01-04 22:07:53 +00:00
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
return true;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Get last inserted id after insert statement
|
|
|
|
*/
|
2003-03-17 10:54:23 +00:00
|
|
|
function sql_nextid()
|
|
|
|
{
|
2005-10-07 23:00:41 +00:00
|
|
|
$result_id = @odbc_exec($this->db_connect_id, 'SELECT @@IDENTITY');
|
|
|
|
|
|
|
|
if ($result_id)
|
|
|
|
{
|
|
|
|
if (@odbc_fetch_array($result_id))
|
|
|
|
{
|
2007-02-19 04:12:13 +00:00
|
|
|
$id = @odbc_result($result_id, 1);
|
2005-10-07 23:00:41 +00:00
|
|
|
@odbc_free_result($result_id);
|
|
|
|
return $id;
|
|
|
|
}
|
|
|
|
@odbc_free_result($result_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Free sql result
|
|
|
|
*/
|
2005-01-04 22:07:53 +00:00
|
|
|
function sql_freeresult($query_id = false)
|
|
|
|
{
|
2006-08-01 16:14:14 +00:00
|
|
|
global $cache;
|
|
|
|
|
2006-10-04 15:15:40 +00:00
|
|
|
if ($query_id === false)
|
2005-01-04 22:07:53 +00:00
|
|
|
{
|
|
|
|
$query_id = $this->query_result;
|
|
|
|
}
|
|
|
|
|
2006-08-01 16:14:14 +00:00
|
|
|
if (isset($cache->sql_rowset[$query_id]))
|
|
|
|
{
|
|
|
|
return $cache->sql_freeresult($query_id);
|
|
|
|
}
|
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
if (isset($this->open_queries[(int) $query_id]))
|
|
|
|
{
|
|
|
|
unset($this->open_queries[(int) $query_id]);
|
|
|
|
return @odbc_free_result($query_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Escape string used in sql query
|
|
|
|
*/
|
2005-01-04 22:07:53 +00:00
|
|
|
function sql_escape($msg)
|
|
|
|
{
|
2006-05-21 16:54:19 +00:00
|
|
|
return str_replace("'", "''", $msg);
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2007-06-23 12:16:20 +00:00
|
|
|
/**
|
|
|
|
* Correctly adjust LIKE expression for special characters
|
|
|
|
* MSSQL needs an escape character being defined
|
|
|
|
*/
|
|
|
|
function sql_like_expression($expression)
|
|
|
|
{
|
|
|
|
// Standard for most DBMS
|
|
|
|
if (strpos($expression, '_') === false)
|
|
|
|
{
|
|
|
|
return 'LIKE \'' . $this->sql_escape($expression) . '\'';
|
|
|
|
}
|
|
|
|
|
|
|
|
// sql_like_expression is only allowed directly within single quotes (to ease the use of it), therefore the special writing of ESCAPE below
|
|
|
|
return 'LIKE \'' . $this->sql_escape(str_replace('_', "\_", $expression)) . "' ESCAPE '\\'";
|
|
|
|
}
|
|
|
|
|
2006-05-05 22:06:17 +00:00
|
|
|
/**
|
|
|
|
* Build db-specific query data
|
2006-08-22 21:26:06 +00:00
|
|
|
* @access private
|
2006-05-05 22:06:17 +00:00
|
|
|
*/
|
|
|
|
function _sql_custom_build($stage, $data)
|
|
|
|
{
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* return sql error array
|
2006-08-22 21:26:06 +00:00
|
|
|
* @access private
|
2005-10-07 23:00:41 +00:00
|
|
|
*/
|
|
|
|
function _sql_error()
|
2003-03-17 10:54:23 +00:00
|
|
|
{
|
2005-08-17 14:29:05 +00:00
|
|
|
return array(
|
2003-06-12 17:11:43 +00:00
|
|
|
'message' => @odbc_errormsg(),
|
|
|
|
'code' => @odbc_error()
|
|
|
|
);
|
2003-03-17 10:54:23 +00:00
|
|
|
}
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Close sql connection
|
2006-08-22 21:26:06 +00:00
|
|
|
* @access private
|
2005-10-07 23:00:41 +00:00
|
|
|
*/
|
|
|
|
function _sql_close()
|
2005-01-04 22:07:53 +00:00
|
|
|
{
|
2005-10-07 23:00:41 +00:00
|
|
|
return @odbc_close($this->db_connect_id);
|
|
|
|
}
|
2005-01-04 22:07:53 +00:00
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
/**
|
|
|
|
* Build db-specific report
|
2006-08-22 21:26:06 +00:00
|
|
|
* @access private
|
2005-10-07 23:00:41 +00:00
|
|
|
*/
|
|
|
|
function _sql_report($mode, $query = '')
|
|
|
|
{
|
2005-01-04 22:07:53 +00:00
|
|
|
switch ($mode)
|
|
|
|
{
|
|
|
|
case 'start':
|
2005-10-07 23:00:41 +00:00
|
|
|
break;
|
2005-01-04 22:07:53 +00:00
|
|
|
|
|
|
|
case 'fromcache':
|
|
|
|
$endtime = explode(' ', microtime());
|
|
|
|
$endtime = $endtime[0] + $endtime[1];
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
$result = @odbc_exec($this->db_connect_id, $query);
|
|
|
|
while ($void = @odbc_fetch_array($result))
|
|
|
|
{
|
|
|
|
// Take the time spent on parsing rows into account
|
|
|
|
}
|
|
|
|
@odbc_free_result($result);
|
2005-04-22 17:44:36 +00:00
|
|
|
|
2005-01-04 22:07:53 +00:00
|
|
|
$splittime = explode(' ', microtime());
|
|
|
|
$splittime = $splittime[0] + $splittime[1];
|
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
$this->sql_report('record_fromcache', $query, $endtime, $splittime);
|
2005-01-04 22:07:53 +00:00
|
|
|
|
2005-10-07 23:00:41 +00:00
|
|
|
break;
|
2005-01-04 22:07:53 +00:00
|
|
|
}
|
|
|
|
}
|
2005-08-17 14:29:05 +00:00
|
|
|
}
|
2003-03-17 10:54:23 +00:00
|
|
|
|
|
|
|
?>
|