Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001011

[PHP-DB] CALL A FUCTION OF ORACLE IN PHP? From: Unimed de Capivari (unicap <email protected>)
Date: 01/08/01

I HAVE THIS STORED FUNCTION.
HOW I CALL THIS FUCTION OF ORACLE IN PHP?

CREATE function F_PARAMETER(PCDPARAMETER IN VARCHAR2) return varchar2 is
  Result VARCHAR2(60);
begin
   -- Function F_PARAMETER
   -- Return THE VALUE FROM PARAMETER
   
BEGIN
   SELECT VLPARAMETER INTO RESULT
   FROM PARAMETER
   WHERE CDPARAMETER = PCDPARAMETER;
EXCEPTION
   WHEN NO_DATA_FOUND THEN
      RAISE_APPLICATION_ERROR(-20001,'Parameter '''||PCDPARAMETER||''' not found');
   when Others then
      RAISE_APPLICATION_ERROR(-20001,'Error searching Parameter '''||PCDPARAMETER||'''');
END;

  return(Result);
end ;

Regards,
Marcos