我尝试以下代码:
$data = $this->_db->select()->from(´IncidentInformation´,array(´IncidentID´,´ContactName´))->where("ContactName=?",$numAlert);
$result = $this->_db->fetchAll($data);
return $result;
但是我收到以下错误:
SQLSTATE [HY000]:常规错误:904 OCIStmtExecute:ORA-00904: “CONTACTPHONE”:标识符无效(\ text \ pdo_oci \ oci_statement.c:146)
答案 0 :(得分:1)
尝试:
$data = $this->_db->select()->from('IncidentInformation',array('IncidentID','ContactName'))->where("ContactName=?",$numAlert);
$result = $this->_db->fetchAll($data);
return $result;