Zend_Db_Select example

return $result;
    }

    /** * Creates and returns a new Zend_Db_Select object for this adapter. * * @return Zend_Db_Select */
    public function select()
    {
        return new Zend_Db_Select($this);
    }

    /** * Get the fetch mode. * * @return int */
    public function getFetchMode()
    {
        return $this->_fetchMode;
    }

    

    public function getSelect()
    {
        if (null === $this->_select) {
            $db = $this->getAdapter();
            /** * Build select object */
            $select = new Zend_Db_Select($db);
            $select->from($this->_table, array($this->_field)$this->_schema);
            if ($db->supportsParameters('named')) {
                $select->where($db->quoteIdentifier($this->_field, true).' = :value'); // named             } else {
                $select->where($db->quoteIdentifier($this->_field, true).' = ?'); // positional             }
            if ($this->_exclude !== null) {
                if (is_array($this->_exclude)) {
                    $select->where(
                          $db->quoteIdentifier($this->_exclude['field'], true) .
                            ' != ?', $this->_exclude['value']
                    );
Home | Imprint | This part of the site doesn't use cookies.