选择语句错误

时间:2013-04-02 03:17:28

标签: php oracle select pdo

我尝试以下代码:

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

1 个答案:

答案 0 :(得分:1)

尝试:

$data = $this->_db->select()->from('IncidentInformation',array('IncidentID','ContactName'))->where("ContactName=?",$numAlert);
$result = $this->_db->fetchAll($data);
return $result;