Zend数据库不产生值


Zend Database does not produce value

请帮忙!知道为什么要打印:

吗?

Array ([0] => stdClass Object ([jobid] => 1))而不是其值?

    $this->dbo->setFetchMode(Zend_Db::FETCH_OBJ);
    $userOffer = $this->dbo->select()
    ->from('offer', array('jobid'))
    ->where('userid'.' = ?', $userID);
    $userAccept = $this->dbo->select()
    ->from('acceptance', array('jobid'))
    ->where("userid".' = ?', $userID);
    $select = $this->dbo->select()
    ->union(array($userOffer, $userAccept))
    ->order("jobid");
    while ($row = $this->dbo->fetchAll($select)) { 
        print_r ($row);
        //return $row;
    }
return $row[0]->jobid;

用那个代替。你需要返回行索引,它是一个对象,然后访问属性jobid。这就是您要做的,因此它返回1的值。