|
| ||||||||||
| Tags: oracle, php, php application, php code, procedure |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Calling Oracle Stored Procedures with PHP
I am a new guy, learning PHP and need to know the functionality of PHP with oracle where as I am so far from oracle but I get more enjoyed with oracle and willing to work with oracle database as a back end for my PHP applications. recently, I need to know about,how I would call particular procedure from the PHP code. Your help would appreciated more...Thank you very much. |
|
#2
| ||||
| ||||
| Oracle Stored Procedures Oracle Stored Procedures : The oracle stored procedures is a program which resides physically in Oracle.The stored procedures are written through PL/SQL but now oracle introduced with some features which makes available you to create Oracle stored procedure with different languages like Java, .NET or other as External Procedures. It is a group or series of relevant functionalities behind a single API.With this feature, the oracle procedures can be called with the help in PHP using some intellectual code.
__________________ The FIFA Manager 2009 PC Game |
|
#3
| ||||
| ||||
| Stored Procedure Input and Output with PHP Stored Procedure Input and Output : When you make a call to the procedure,all input and output data is passed as arguments to the procedure.This may be doubtful at first,if you will use the semantics of calling a PHP function with some arguments which returns a value as example shows : Quote:
|
|
#4
| ||||
| ||||
| Calling Stored Procedures from PHP Calling Stored Procedures from PHP : According to the behavior of SQL statement,you use the statement under PHP codes and make a call to the procedure.You will nest the calls between the BEGIN ... END block which is also known as Anonymous block. Like : <?php // etc. $sql = 'BEGIN Computer_data(:Order_count, :Values_Rs); END;'; This statement will bind the variables with the PHP variables with calls to oci_bind_by_name(). If the sayHello procedure was defined by the following DDL statement: Code: CREATE OR REPLACE PROCEDURE
Computer_data (order_count IN INTEGER, Values_Rs OUT INTEGER)
AS
BEGIN
Values_Rs := 2,12000 || Order_count;
END; |
|
#5
| ||||
| ||||
| Calling Oracle Stored Procedures with PHP
Run the created script with the SQL*Plus command line and save the executed statement in the file with the identification name and login again. $ sqlplus username@SID Now create the procedure with the START command with the name of file : SQL> START /home/username/Comp_pro.SQL |
|
#6
| |||
| |||
| Containing the codes to call Stored Procedures within PHP Codes to call Stored Procedures within PHP : You need to use the following script to call the procedure within PHP : Quote:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Calling Oracle Stored Procedures with PHP" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extracting stored procedures | Maal-Gaadi | Software Development | 3 | 29-12-2010 06:29 PM |
| Using stored procedures and stored functions in MySQL | Adiran | Software Development | 6 | 14-12-2010 12:54 AM |
| What is SQL Stored Procedures? | technika | Software Development | 5 | 20-02-2010 04:00 PM |
| How to execute Stored procedures in Hibernate? | NegiRaj | Software Development | 3 | 10-08-2009 11:54 PM |
| Is it a good practice of creating and using stored procedures for a database? | Sentential | Software Development | 3 | 03-08-2009 09:13 PM |