Home » Open Source » Programming Interfaces » Create stored procudere in PHP ?
Create stored procudere in PHP ? [message #4230] Wed, 20 November 2002 10:11 Go to next message
Ro
Messages: 3
Registered: November 2002
Junior Member
Is it possible to create or update a stored proc in PHP ?
if I insert a row into User_source table, will Oracle consider it as a stored procedure or not ?
Thank
best regards,
Ro
Re: Create stored procudere in PHP ? [message #4231 is a reply to message #4230] Wed, 20 November 2002 11:08 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
first, USER_SOURCE is a view.
and u cannot add entries to oracle dictionary.
why dont you just create a stored procedure, 
using dynamic sql? something like this?
and now, u can call this procedure CR_PROC which creates a procedure.
SQL> ed
Wrote file afiedt.buf

  1  create or replace procedure cr_proc
  2  as
  3  begin
  4  execute immediate ('create or replace procedure test23234 as begin dbms_output.put_line(''test'');
  5* end;
SQL> /

Procedure created.

SQL> exec cr_proc;

PL/SQL procedure successfully completed.
SQL> set serveroutput on
SQL> exec test23234;
test

PL/SQL procedure successfully completed.

SQL> 

Re: Create stored procudere in PHP ? [message #4272 is a reply to message #4230] Sun, 24 November 2002 06:15 Go to previous message
Ro
Messages: 3
Registered: November 2002
Junior Member
my problem is that I cannot create a stored procedure within PHP.
when I run a query like this "Create Procedure ro as begin htp.p('hell'); end ro;", php will return a warning "Warning: OCIStmtExecute: OCI_SUCCESS_WITH_INFO in /home/httpd/html/djn/inc/db_fns.php on line 36 " however there is a procedure named "ro" in user_source view, but when I access www.myserver.com/pls/myDAD/ro, Oracle returns a error complaining that procedure "ro" doesn't exist.
help, please.
thanks.
best regards,
Ro.
Previous Topic: LONG type - ORA-01704: string literal too long - Php
Next Topic: Re: Oracle 9i and PHP--how?
Goto Forum:
  


Current Time: Thu Mar 28 11:04:49 CDT 2024