【问题标题】:Zend select issueZend 选择问题
【发布时间】:2012-05-01 11:12:26
【问题描述】:

我在使用 zend 数据库表库时遇到问题;

抱歉,我已经修复了上一个问题,但在函数中得到了另一个问题

Message: Method "fetchAll" does not exist and was not trapped in __call()

这是我正在使用的脚本

 //setIntegrityCheck to false to allow joins
        $roomModel = new self();

        $select = $roomModel->select(Zend_Db_Table::SELECT_WITH_FROM_PART)
                ->setIntegrityCheck(FALSE);

        //performs join aliasing table room_type to t
        $select->join(array('t' => 'room_types'), 't.room_type_id = room.room_type_id AND num_beds> '.$number_beds);
        ////performs join aliasing table room_status to s
        $select->join(array('s' => 'room_statuses'), 's.room_status_id = room.room_status_id');

        $select->join(array('chin' => 'checkin'), 'chin.checkin_date IS NOT BETWEEN `'.$checkin.'` AND `'.$checkout.'`');

        $select->join(array('chout' => 'checkout'), 'chout.checkout_date IS NOT BETWEEN `'.$checkin.'` AND `'.$checkout.'`');

        $result = $this->fetchAll($select);

        return $result;

【问题讨论】:

  • 在您的示例中$this 是什么?

标签: php zend-framework zend-db zend-db-table


【解决方案1】:

尝试使用 $roomModel 而不是 $this

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-09
    • 1970-01-01
    • 2018-08-25
    • 2011-06-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多