代码之家  ›  专栏  ›  技术社区  ›  Alex Pliutau

找不到zend列:1054“字段列表”中的未知列“0”

  •  0
  • Alex Pliutau  · 技术社区  · 14 年前

    我有下一个代码:

        $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();
    

    但是Zend创建了一个错误“column not found:1054 unknown column'0'in'field list'”(找不到列:1054行中的未知列“0”)。 $ranks = $this->fetchAll($select_data)->toArray();

    我怎么解决这个问题?

    1 回复  |  直到 13 年前
        1
  •  -3
  •   Toto    13 年前

    只需在“priority”后从数组中取消最后一个“”。