开发者

Zend Column not found: 1054 Unknown column '0' in 'field list'

I have a next code:

    $parent_priority = $data['priority'];
    $where = $this->getAdapter()->quoteInto('priority >= ?', $parent_priority);
    $columns = array ('id',
                      'title',
                      'enabled',
                      'description',
                      'pv',
                      'gv',
                      'mps', 'priority',
                      );
    $select_data = $this->select()->from($this->_name, $columns);
    $ranks = $this->fetchAll($select_data)->toArray();

But Zend create an error "Column not found: 1054 Unknown column '0' in 'field list'" in line $ranks = $this->fetchAll($select_data)->t开发者_开发问答oArray();

How I can solve this?


Just suppress the last "," from your array after 'priority'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜