|
|
|
<?PHP
// In diesem Beispiel wird beschrieben wie man eine StoredProcedure aufruft,
// einen Integer übergibt und diesen wieder ausgibt.
// Oracle Client muß installiert sein und die extension php_oci8 muß installiert sein!
// Bei dem Beispiel: ps
// Host-Name: rechner
// Port-Nummer: 1521
// Variablen
$usr = "Dein User";
$pwd = "Dein Passwort";
$sid = "Dienstname";
// Verbindung zum Oracle-Server herstellen
$conn = OCILogon ($usr, $pwd, $sid);
// SoredProcedure t_phpsaveproc(integer) aufrufen
$stmt = OCIParse($conn, "begin :result := t_phpsaveproc(1); end;");
// OCIBindByName bindet die Variable result an den Platzhalter $result
OCIBindByName($stmt, "result", &$result);
// Commit, hier werden die "Jobs" ausgeführt.
OCIExecute($stmt);
// Mit OCIResult wird der Rückgabewert der StoredProcedure aus der Menge in die PHP-Variable $result
geschrieben
OCIResult($stmt,$result);
// Ausgabe des Rückgabewertes
echo $result;
// Verbindung zum Oracle-Server schließen
ocilogoff($conn);
?> |
|
| normalize fields and strings used in where (command's Sql) Categories : PHP, Databases, Oracle, Functions | | | Logs hits to any page which includes it. Automatically utilises page access information left behind by PHP/FI2.0. Categories : Databases, PHP, mSQL, Databases | | | Connecting to Oracle with php3 Categories : Oracle, PHP, Databases | | | Simple class for accessing databases like MSSql Server, Oracle etc by Raju Categories : PHP, MS SQL Server, Databases, PHP Classes, Oracle | | | This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | A database abstraction layer for the PHP Oracle 8 module (available from PHP 3.0.5). It supports persistent connections, fetching rows into arrays, prepare/execute (variable binding) and has a new and improved error interface. Categories : Databases, Oracle, PHP, Arrays, Variables | | | PHP CLASS for ORACLE (database connectivity) Categories : PHP, PHP Classes, Classes and Objects, Databases, Oracle | | | get de errror message to access the database Categories : PHP, OCI8, Databases | | | Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs. Categories : Databases, PHP, MySQL, Complete Programs | | | Cut your MySQL Connections to 1 line of code Categories : PHP, Beginner Guides, Databases, MySQL | | | phpAds, a complete banner and ad management system with detailled tracking and stats. Categories : MySQL, Complete Programs, Ecommerce, PHP, Databases | | | Point and Click Interface ala MS Access for creating SQL statements. Categories : MySQL, Complete Programs, General SQL, PHP, Databases | | | Displaying records of database in more than one page (paging) Categories : Databases, MySQL, PHP | | | Message of the Day - Random Message (Needs MySQL!) Categories : Databases, HTML and PHP, PHP, MySQL | | | Function Query2Array will read an PEAR-DB-Query-Result into an Array.
You may specify a Column used as Array-Keys,
and you may specify the Number of Rows to skip at the beginning and the
Number to fetch (-1 = infinite). Categories : Functions, PHP, Databases | |
| | | | Laurence Veale wrote :666
Is this actually a stored procedure or a function?
I can call procedures no problem, but I`m not having any luck calling a function that returns a value to a PL/SQL variable.
How do I do the PHP equivalent of the following in PL/SQL...
DECLARE
answer NUMBER;
BEGIN
Answer:=package.function1(1500,`10-JUN-2001`,`23-JUL-2001`);
DBMS_OUTPUT.Put_Line(`The answer is: ` ||Answer);
END;
| |
|
|
|