I have wrote a stored procedure to return details about a customer in my oracle database.

I will then be connecting to it via PHP.... (I have do this but again it only returns the last row)

I have a problem with my procedure - it only returns the last row. If I do a dbms_output.put_line in my loop it returns the correct values. Is there any way to return all the rows?

Here is my code for the procedure:

PHP Code:

CREATE 
OR REPLACE PROCEDURE sp_customerinfo(p_customertype IN tblCustomer.Type%TYPEp_CustomerID OUT tblCustomer.CustomerID%TYPEp_CustomerDOB OUT tblCustomer.DOB%TYPE
IS 
    CURSOR customer_cursor IS
    SELECT CustomerID
    FROM   tblCustomer
    WHERE  Type 
p_customertype;

v_CustomerID tblCustomer.CustomerID%TYPE;


BEGIN

  OPEN customer_cursor
;
    
LOOP
      FETCH customer_cursor into v_CustomerID
;
      EXIT 
WHEN customer_cursor%NOTFOUND;

      
SELECT CustomerIDDOB
      INTO  p_CustomerID
p_CustomerDOB
      FROM tblCustomer
      WHERE CustomerID 
v_CustomerID;

END LOOP;
CLOSE customer_cursor;

END;

Any ideas?