Hello, and thanks in advance.
I've been using PHP 4.1.1 with Apache backed into Oracle 8.1.6. I've been doing some select statements on the page and been using some procedures for insert and update. I would like to use a procedure and get all the sql coding off of the page and into procedures. my problem is when I'm trying to get one or more records back from the procedure. so here's the code and the plsql.
$userid_out =999999999;
$db = new oradb;
$conn = $db->connect();
$sql = "begin p_check_login( 'ekimble' , 'jasdfj' , :userid_out) ; end;";
$parse = OCIparse($conn, $sql);
OCIbindbyname( $parse, ":userid_out", $userid_out, 10);
OCIexecute($parse);
while (OCIfetch($parse)){
print "$parse";
}
and the pl/sql
CREATE OR REPLACE PROCEDURE p_check_login(username_in IN VARCHAR2, password_in IN VARCHAR2, userid_out IN OUT NUMBER)
IS
linenumber NUMBER;
sqlerrormessage VARCHAR2(32767);
sqlerrornum NUMBER;
userid_inside NUMBER;
BEGIN
linenumber := 1;
SELECT user_id
INTO userid_inside
FROM bidtabusers
WHERE user_name=username_in
AND password = password_in;
userid_out := userid_inside;
linenumber := 5;
END;
any ideas where i'm going wrong?