在这里,我试图插入一条记录并检索最后插入的序列 ID,但没有取得任何成功,谁能帮助我,指导我 oracle 如何与 php 一起工作?
$query = 'INSERT INTO hist_news (id,headline,reportedon,reportedby,loc,story,more,helperjson,refjson,createdt,createdby) VALUES(id.nextval, :headline, :reportedon, :reportedby , :loc , :story , :more , :helper , :ref , sysdate , :createdby) return id.nextval';
$this->stmt = oci_parse($this->oci,$query);
oci_bind_by_name($this->stmt,':headline',$headline);
oci_bind_by_name($this->stmt,':reportedon',$reportedon);
oci_bind_by_name($this->stmt,':reportedby',$reportedby);
oci_bind_by_name($this->stmt,':loc',$loc);
oci_bind_by_name($this->stmt,':story',$story);
oci_bind_by_name($this->stmt,':more',$more);
oci_bind_by_name($this->stmt,':helper',$helperjson);
oci_bind_by_name($this->stmt,':ref',$refjson);
if($re = oci_execute($this->stmt)){
return $re;
} else {
return false;
}