mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 03:39:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1079 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2a13d510fb
commit
0e53c321df
12 changed files with 140 additions and 61 deletions
|
|
@ -117,17 +117,35 @@
|
|||
**/
|
||||
function _query($query) {
|
||||
if(!$this->isConnected()) return;
|
||||
|
||||
$this->query = $query;
|
||||
|
||||
if(__DEBUG__) $query_start = getMicroTime();
|
||||
|
||||
$this->setError(0,'success');
|
||||
|
||||
$result = @mysql_query($query, $this->fd);
|
||||
|
||||
if(__DEBUG__) {
|
||||
$query_end = getMicroTime();
|
||||
$elapsed_time = $query_end - $query_start;
|
||||
$GLOBALS['__db_elapsed_time__'] += $elapsed_time;
|
||||
}
|
||||
|
||||
if(mysql_error()) {
|
||||
$this->setError(mysql_errno(), mysql_error());
|
||||
|
||||
if(__DEBUG__) {
|
||||
$GLOBALS['__db_queries__'] .= sprintf("\t%02d. %s (%0.6f sec)\n\t Fail : %d\n\t\t %s\n", ++$GLOBALS['__dbcnt'], $this->query, $elapsed_time, $this->errno, $this->errstr);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(__DEBUG__) {
|
||||
$GLOBALS['__db_queries__'] .= sprintf("\t%02d. %s (%0.6f sec)\n", ++$GLOBALS['__dbcnt'], $this->query, $elapsed_time);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue