涉及doQuery()的函数不起作用

时间:2013-07-02 19:02:34

标签: php jquery sql

目前,我有一个班级

class view {

    var $db;
    var $sql = "";
    var $sql_params = array();
    var $resultList;

在这个课程中,有一个'function get_list($ option)'

    //$db = new db();
        //$db->getConnection();
        $rs = $this->db->doQuery($this->sql, $this->sql_params);
        $this->resultList = $rs;

        if($option == 'html_table') {
            if(!count($rs)) {
                $out = "<center>No Results, please search again.</center>";
            } else {
                if(isset($_SESSION['magickey'])) {
                    $loggedIn = true;
                } else {
                    $loggedIn = false;
                }

我知道它返回错误的原因是因为

有问题

这一行

$rs = $this->db->doQuery($this->sql, $this->sql_params);

函数get_list占用参数

get_list('html_table');

那条线有什么问题?这是错误消息:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: 
Column not found: 1054 Unknown column 'q1.country' in 'where clause'' in /usr/local/zend/share/ZendFramework/library/Zend/Db/Statement/Pdo.php on line 234 ( ! )
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q1.country' in 'where clause' in /usr/local/zend/share/ZendFramework/library/Zend/Db/Statement/Pdo.php on line 228 

0 个答案:

没有答案