本文整理汇总了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;
}