Hi,
I keep getting this error with the code I am using in PHP and Oracle:
DATABASE ERROR OCCURRED - 2003-02-17 11:24:50 AM
ORA-01008: not all variables bound
SELECT employee_name, employee_id, role_id, employee_username, employee_password
FROM employee
WHERE employee_username = UPPER(:IN_USER)
AND employee_password = UPPER(:IN_PASS)
I am trying to use a function to perform a select statement, and I am passing in the binding arguments to this function....
function db_check_login($user,$pass) {
// set up SQL query
$SQL = sprintf("
SELECT employee_name, employee_id, role_id, employee_username, employee_password
FROM employee
WHERE employee_username = UPPER(:IN_USER)
AND employee_password = UPPER(:IN_PASS)");
// set up bind arguments
$bargs = array();
array_push($bargs, array("IN_USER",$user,-1));
array_push($bargs, array("IN_PASS",$pass,-1));
$stmt = $this->query($SQL,$bargs);
if (!stmt) return (false);
return $stmt;
}
this is the function i am calling...here is the code that I am using to call this function...
$stmt = $db->db_check_login($UserName,$PassWord);
$nrows = OCIFetchStatement($stmt,$results);
I don't understand what the error means as I am binding the arguments in the function...
thanks
sp