?
Solved

Calling Oracle Procedure from PHP Scripts

Posted on 2003-03-01
5
Medium Priority
?
243 Views
Last Modified: 2013-12-12
Hi ...
Can you help me about calling Oracle procedure from PHP scripts?

Thanks
0
Comment
Question by:Hytham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
dboeke earned 150 total points
ID: 8054240
Here is a sample of how to do it:

<?
 $conn = ocilogon("scott","tiger","ORCL");
 $theNumber= 12345;
 $theDate = date(d."/".m."/".Y);
 $query = ("BEGIN MY_STORED_PROC (:SEQ_NUMBER, :SYSDATE); END;");
 $stmt = OCIParse($conn,$query);
 OCIBindByName($stmt, ":SEQ_NUMBER", &$theNumber,5);
 OCIBindByName($stmt, ":SYSDATE", &$theDate , 10);  
 OCIExecute($stmt);
?>


0
 

Author Comment

by:Hytham
ID: 8056125
Thanks a lot,

Actually, I am using the Oracle Functions located in the following link: http://www.php.net/manual/en/ref.oracle.php
not the OCIOracle Functions.
Is it a way to do the above simple example by Oracle Functions of PHP, or, I must use OCI to do that?

Thanks again

Hytham
0
 
LVL 2

Expert Comment

by:dboeke
ID: 8056786
What oracle version are you using?
0
 

Author Comment

by:Hytham
ID: 8062736
Oracle Version (9i) 9.2.0.1.0
0
 
LVL 2

Expert Comment

by:dboeke
ID: 8068209
you should be using the oci functions:  http://www.php.net/manual/en/ref.oci8.php the oracle functions you referenced were for pre oracle 8, the oci support 7.x, 8.x, and 9.x


0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question