本文整理匯總了PHP中PDOStatement::getAttribute方法的典型用法代碼示例。如果您正苦於以下問題:PHP PDOStatement::getAttribute方法的具體用法?PHP PDOStatement::getAttribute怎麽用?PHP PDOStatement::getAttribute使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PDOStatement
的用法示例。
在下文中一共展示了PDOStatement::getAttribute方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAttribute
public function getAttribute($attribute)
{
if ($this->_statement instanceof \PDOStatement) {
return $this->_statement->getAttribute($attribute);
}
return null;
}
示例2: getAttribute
/**
* Retrieve a statement attribute.
*
* @param integer $key Attribute name.
* @return mixed Attribute value.
* @throws Zend_Db_Statement_Exception
*/
public function getAttribute($key)
{
try {
return $this->_stmt->getAttribute($key);
} catch (PDOException $e) {
require_once 'Zend/Db/Statement/Exception.php';
throw new Zend_Db_Statement_Exception($e->getMessage());
}
}
示例3: getFetchSize
public function getFetchSize()
{
$this->checkClosed();
return $this->stmt->getAttribute(\PDO::ATTR_PREFETCH);
}
示例4: getAttribute
/**
* @param int $attribute
* @return mixed
* @throws \Compeek\PDOWrapper\NotConnectedException
*/
public function getAttribute($attribute)
{
$this->requireConnection();
return $this->pdoStatement->getAttribute($attribute);
}
示例5: getAttribute
/**
* @param int $attribute
* @return mixed
*/
public function getAttribute($attribute)
{
$archLog = array('method' => 'PDOStatement::getAttribute', 'input' => array('attribute' => $attribute), 'output' => $this->PDOStatement->getAttribute($attribute), 'pointer' => $this->assignPointerString());
return self::setLogReturnOutput($archLog);
}
示例6: getCursorName
public function getCursorName()
{
$this->checkClosed();
return String::asWrapper($this->pdoStmt->getAttribute(\PDO::ATTR_CURSOR_NAME));
}