當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PropelPDO::getDebugSnapshot方法代碼示例

本文整理匯總了PHP中PropelPDO::getDebugSnapshot方法的典型用法代碼示例。如果您正苦於以下問題:PHP PropelPDO::getDebugSnapshot方法的具體用法?PHP PropelPDO::getDebugSnapshot怎麽用?PHP PropelPDO::getDebugSnapshot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PropelPDO的用法示例。


在下文中一共展示了PropelPDO::getDebugSnapshot方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: bindParam

 /**
  * Binds a PHP variable to a corresponding named or question mark placeholder in the SQL statement
  * that was use to prepare the statement. Unlike PDOStatement::bindValue(), the variable is bound
  * as a reference and will only be evaluated at the time that PDOStatement::execute() is called.
  * Returns a boolean value indicating success.
  *
  * @param integer $pos            Parameter identifier (for determining what to replace in the query).
  * @param mixed   $value          The value to bind to the parameter.
  * @param integer $type           Explicit data type for the parameter using the PDO::PARAM_* constants. Defaults to PDO::PARAM_STR.
  * @param integer $length         Length of the data type. To indicate that a parameter is an OUT parameter from a stored procedure, you must explicitly set the length.
  * @param mixed   $driver_options
  *
  * @return boolean
  */
 public function bindParam($pos, &$value, $type = PDO::PARAM_STR, $length = 0, $driver_options = null)
 {
     $debug = $this->pdo->getDebugSnapshot();
     $typestr = isset(self::$typeMap[$type]) ? self::$typeMap[$type] : '(default)';
     $return = parent::bindParam($pos, $value, $type, $length, $driver_options);
     $valuestr = $length > 100 ? '[Large value]' : var_export($value, true);
     $msg = sprintf('Binding %s at position %s w/ PDO type %s', $valuestr, $pos, $typestr);
     $this->boundValues[$pos] = $valuestr;
     $this->pdo->log($msg, null, __METHOD__, $debug);
     return $return;
 }
開發者ID:szabobeni,項目名稱:benstore,代碼行數:25,代碼來源:DebugPDOStatement.php

示例2: bindValue

 /**
  * Binds a value to a corresponding named or question mark placeholder in the SQL statement
  * that was use to prepare the statement.  Returns a boolean value indicating success.
  *
  * @param      int $pos Parameter identifier (for determining what to replace in the query).
  * @param      mixed $value The value to bind to the parameter.
  * @param      int $type Explicit data type for the parameter using the PDO::PARAM_* constants. Defaults to PDO::PARAM_STR.
  * @return     boolean
  */
 public function bindValue($pos, $value, $type = PDO::PARAM_STR)
 {
     $debug = $this->pdo->getDebugSnapshot();
     $typestr = isset(self::$typeMap[$type]) ? self::$typeMap[$type] : '(default)';
     $return = parent::bindValue($pos, $value, $type);
     $valuestr = $type == PDO::PARAM_LOB ? '[LOB value]' : var_export($value, true);
     $msg = "Binding {$valuestr} at position {$pos} w/ PDO type {$typestr}";
     $this->boundValues[$pos] = $valuestr;
     $this->pdo->log($msg, null, __METHOD__, $debug);
     return $return;
 }
開發者ID:RadioCampusFrance,項目名稱:airtime,代碼行數:20,代碼來源:DebugPDOStatement.php


注:本文中的PropelPDO::getDebugSnapshot方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。