开发者

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

开发者 https://www.devze.com 2023-01-12 17:21 出处:网络
I have a next code: $parent_priority = $data[\'priority\']; $where = $this->getAdapter()->quoteInto(\'priority >= ?\', $parent_priority);

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

精彩评论

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