Currently, I have a class
class view {
var $db;
var $sql = "";
var $sql_params = array();
var $resultList;
And inside this class, there is a '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;
}
I know the reason it's returning error is because there's something wrong with
this one line
$rs = $this->db->doQuery($this->sql, $this->sql_params);
the function get_list take up parameter
get_list('html_table');
So what's wrong with that line? This is the error message:
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