本文整理匯總了PHP中Zend_Db_Profiler::queryStart方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Db_Profiler::queryStart方法的具體用法?PHP Zend_Db_Profiler::queryStart怎麽用?PHP Zend_Db_Profiler::queryStart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Db_Profiler
的用法示例。
在下文中一共展示了Zend_Db_Profiler::queryStart方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: rollBack
/**
* Roll back a transaction and return to autocommit mode.
*
* @return Zend_Db_Adapter_Abstract
*/
public function rollBack()
{
$this->_connect();
$q = $this->_profiler->queryStart('rollback', Zend_Db_Profiler::TRANSACTION);
$this->_rollBack();
$this->_profiler->queryEnd($q);
return $this;
}
示例2: queryStart
/**
* Obsługa rozpoczęcia kwerendy .
*
* @param type $queryText
* @param type $queryType
* @return type
*/
public function queryStart($queryText, $queryType = null)
{
$queryId = parent::queryStart($queryText);
if ($this->getEnabled()) {
$message = "SQL({$queryId}): " . $queryText;
// log the message as INFO message
$this->_log->info($message);
}
return $queryId;
}
示例3: queryStart
/**
* Starts a query. Creates a new query profile object (Zend_Db_Profiler_Query)
* and returns the "query profiler handle". Run the query, then call
* queryEnd() and pass it this handle to make the query as ended and
* record the time. If the profiler is not enabled, this takes no
* action and immediately returns null.
*
* @param string $queryText SQL statement
* @param integer $queryType OPTIONAL Type of query, one of the Zend_Db_Profiler::* constants
* @return integer|null
*/
public function queryStart($queryText, $queryType = null)
{
// file_put_contents('/var/www/query.log',$queryText."\n\n",FILE_APPEND);
return parent::queryStart($queryText, $queryType);
}
示例4: getLastQueryProfile
public function getLastQueryProfile()
{
$queryId = parent::queryStart($this->_lastQueryText, $this->_lastQueryType);
return parent::getLastQueryProfile();
}
示例5: queryStart
public function queryStart($queryText, $queryType = null)
{
Zend_Registry::get('logger')->log("DB QUERY: {$queryText}", Zend_Log::DEBUG);
return parent::queryStart($queryText, $queryType);
}