Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 未找到Zend列:1054未知列';0';在';字段列表';_Php_Mysql_Zend Framework_Zend Db_Mysql Error 1054 - Fatal编程技术网

Php 未找到Zend列:1054未知列';0';在';字段列表';

Php 未找到Zend列:1054未知列';0';在';字段列表';,php,mysql,zend-framework,zend-db,mysql-error-1054,Php,Mysql,Zend Framework,Zend Db,Mysql Error 1054,我有下一个代码: $parent_priority = $data['priority']; $where = $this->getAdapter()->quoteInto('priority >= ?', $parent_priority); $columns = array ('id', 'title', 'enabled',

我有下一个代码:

    $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在
$ranks=$this->fetchAll($select_data)->toArray()行中创建了一个错误“Column not found:1054“field list”中的未知列“0”


如何解决这个问题?

只需在“优先级”之后从数组中取消最后一个“,”

是否有任何方法可以获取生成的SQL?是的。但是我应该使用Zend Apportionaties。不,我的意思是查看实际发送到服务器的SQL,以便您可以尝试推断出哪里出了问题(从而为您提供一个查找调试的位置)。。。