[SOLVED]oci_execute() returns false and oci_error() is false
Posted: Fri May 06, 2011 10:53 am
I've got the following code in my class:
I stop the debugger at the line noted and check my values - they're all good. I even verified that the empty input data is a zero-length string, not just a null.
I've checked everything I can think of, and when I step it, I hit the $updated = false; line. Okay, so let's see what oci_error() returns, right? False, that what it returns.
So, if oci_execute() comes back false, and oci_error() comes back false, what's the deal? Anybody seen this before?
Code: Select all
public function updateVacancy($vacId, $jobID, $locID, $numVacancies,
$sort_order=null, $status, $hrs_no=null, $empType, $pay, $hours,
$qualClass, $stDate, $endDate){
$updated = true;
$conn = new DBConnection();
if(0 == $vacId){
$sas_vacancy_no = $conn->getNextId("sas_vacancy_number_seq");
$query = "insert into vacancies (VACANCYID, JOBID, LOCID, SORT_ORDER, ".
"DBUSER, STATUS, STATUSDATE, UM_HRS_VACANCY_NO, ".
"EMPLOYMENT_TYPE, OPENINGS, WAGES, HOURS, QUALIFIED_CLASS, ".
"START_DATE, END_DATE) ".
"values (:sas_vacancy_no, :jobID, :locID, :sort_order, ".
":HRuser, 'ACTIVE', sysdate, :hrs_no, :empType, :openings, :wages, ".
":hours, :qualClass, :start, :end)";
$stid = oci_parse($conn->getConnection(), $query);
oci_bind_by_name($stid, ":sas_vacancy_no", $sas_vacancy_no);
oci_bind_by_name($stid, ":jobID", $jobID);
oci_bind_by_name($stid, ":locID", $locID);
oci_bind_by_name($stid, ":sort_order", $sort_order);
oci_bind_by_name($stid, ":HRuser", $_SESSION['HRuser']);
oci_bind_by_name($stid, ":hrs_no", $hrs_no);
oci_bind_by_name($stid, ":empType", $empType);
oci_bind_by_name($stid, ":openings", $numVacancies);
oci_bind_by_name($stid, ":wages", $pay);
oci_bind_by_name($stid, ":hours", $hours);
oci_bind_by_name($stid, ":qualClass", $qualClass);
oci_bind_by_name($stid, ":start", $stDate);
oci_bind_by_name($stid, ":end", $endDate);
if(!oci_execute($stid)){ // <---------------------Here is where I hit the breakpoint
$updated = false;
$err = oci_error();
$this->setOciErrorMsg($err);
}
I've checked everything I can think of, and when I step it, I hit the $updated = false; line. Okay, so let's see what oci_error() returns, right? False, that what it returns.
So, if oci_execute() comes back false, and oci_error() comes back false, what's the deal? Anybody seen this before?