本文整理匯總了PHP中Zend_Db_Adapter_Abstract::getAdapter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Db_Adapter_Abstract::getAdapter方法的具體用法?PHP Zend_Db_Adapter_Abstract::getAdapter怎麽用?PHP Zend_Db_Adapter_Abstract::getAdapter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Db_Adapter_Abstract
的用法示例。
在下文中一共展示了Zend_Db_Adapter_Abstract::getAdapter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: delete
/**
* Delete data
*
* @param int $id
* @return int|bool
*/
public function delete($del_id)
{
// $this->_dbTable->select()
// ->setIntegrityCheck(false)
// ->from($this->_prefix.'translate_menu');
$this->_dbTable->getAdapter()->delete($this->_prefix . 'translate', array('`key` = ?' => $del_id));
return $this->_dbTable->getAdapter()->delete($this->_prefix . 'translate_key', array('`key` = ?' => $del_id));
}
示例2: isValid
/** Check if valid
* @access public
* @param string $value
* @param string $context
* @return boolean
*/
public function isValid($value, $context = null)
{
$this->_setValue($value);
$where = array();
// Check that this is not the user's own identity
if (isset($context[$this->_idKey])) {
$where[] = $this->_zendDbTable->getAdapter()->quoteInto($this->_primaryKeyColumn . ' != ?', $context[$this->_idKey]);
}
$where[] = $this->_zendDbTable->getAdapter()->quoteInto($this->_identityColumn . ' = ?', $value);
$row = $this->_zendDbTable->fetchRow($where);
if (null !== $row) {
$this->_error(self::NOT_UNIQUE);
return false;
}
return true;
}
示例3: isValid
public function isValid($username, $key, $email)
{
$username = $this->_getParam('username');
$key = $this->_getParam('key');
$email = $this->_getParam('email');
$where = array();
// Check that this is not the user's own identity
$where[] = $this->_zendDbTable->getAdapter()->quoteInto($this->_Key . ' = ?', $key);
$where[] = $this->_zendDbTable->getAdapter()->quoteInto($this->_emailColumn . ' = ?', $email);
$where[] = $this->_zendDbTable->getAdapter()->quoteInto($this->_identityColumn . ' = ?', $username);
$row = $this->_zendDbTable->fetchRow($where);
if (null !== $row) {
$this->_error(self::NOT_VALID);
return false;
}
return true;
}