Changeset 18990 for branches/camp/camp-2_5-D/data/class/SC_Query.php
- Timestamp:
- 2010/11/06 20:27:45 (16 years ago)
- File:
-
- 1 edited
-
branches/camp/camp-2_5-D/data/class/SC_Query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_5-D/data/class/SC_Query.php
r18980 r18990 775 775 */ 776 776 function execute(&$sth, $arrVal = array()) { 777 $timeStart = SC_Utils_Ex::sfMicrotimeFloat(); 777 778 $affected =& $sth->execute($arrVal); 779 780 // 一定以上時間かかったSQLの場合、ログ出力する。 781 if(defined('SQL_QUERY_LOG_MODE') && SQL_QUERY_LOG_MODE == true) { 782 $timeEnd = SC_Utils_Ex::sfMicrotimeFloat();; 783 $timeExecTime = $timeEnd - $timeStart; 784 if(defined('SQL_QUERY_LOG_MIN_EXEC_TIME') && $timeExecTime >= (float)SQL_QUERY_LOG_MIN_EXEC_TIME) { 785 //$logMsg = sprintf("SQL_LOG [%.2fsec]\n%s", $timeExecTime, $this->getLastQuery(false)); 786 $logMsg = sprintf("SQL_LOG [%.2fsec]\n%s", $timeExecTime, $sth->query); 787 GC_Utils_Ex::gfPrintLog($logMsg); 788 } 789 } 790 778 791 if (PEAR::isError($affected)) { 779 792 $sql = isset($sth->query) ? $sth->query : '';
Note: See TracChangeset
for help on using the changeset viewer.
