Home| Progetto| Web| Faq| Acronimi | ||||
Argomenti Documenti pubblicabili:1120
Scripts:1282 Documenti non pubblicabili:162 Categorie tematiche:68 .Net |_C# |_Visual basic.net |_Asp.net Active Server Pages C++ Cascade Style Sheet JavaScript Mysql Php Xml Java |_Java 2 Micro Edition |_Java server pages |_Java Servlet Oracle |_PLSQL PostgreSQL Unix
Php...
Info:
Classes as functions containers
Oracle...
Script:
Dato il nome di una vista ricava informazioni su tipo e attributi della colonna di riferimenti
Unix...
Tip:
Rimuovere un file in Unix / Delete a file
PLSQL...
Script:
Leggere un file di testo
Php...
Tip:
Ignorare gli errori
Php...
Faq:
What is PHP?
Shell scripting...
Script:
Debug shell program
Basically, a web session can be defined as the timeframe in which a visitor navigates your web site.
Php Funzione mail()
XPath is a language for addressing parts of an XML document.
It is designed to be used by XSLT and XPointer.
Basically, a web session can be defined as the timeframe in which a visitor navigates your web site.
|
Php
Home >Php > Php and Oracle executing pl/sql procedure with input and output values
In this example the php page execute a sample pl/sql function, to simplify the pl/sql code does not interact as usually with datas. Infact pl/sql procedure pro_demo_in_out receives an input number and returs the number doubled and the type (even or odd):
create or replace procedure pro_demo_in_out(in_num in number, out_double out number, out_type out varchar2)
IS BEGIN out_double := in_num * 2; if MOD(in_num,2) = 0 then -- even out_type:= 'EVEN'; else -- odd out_type:= 'ODD'; end if; end; Here the php code to execute the pl/sql program: # defining connection to Oracle DB $schema = 'TEST'; $passw = 'TEST'; $condes = 'DB2M'; $job_id = 'demo_in_out'; $vin_num = 100; if ($c=OCILogon($schema ,$passw, $condes)) { echo "Successfully connected to Oracle. "; #OCILogoff($c); } else { $err = OCIError(); echo "Oracle Connect Error " . $err[text]; } $stmt ="begin pro_demo_in_out(:vin_num, :vout_double,:vout_type); end;"; // Calling plsql procedure... $s = OCIParse($c, $stmt); OCIBindByName($s, ":vin_num", $vin_num); OCIBindByName($s, ":vout_double", $vout_double,10);// 10 is the return length OCIBindByName($s, ":vout_type", $vout_type,5);// 5 is the return length OCIExecute($s, OCI_DEFAULT); echo "Procedure returned value: " . $vout_double; echo " "; echo "Procedure returned value: " . $vout_type; OCILogoff($c); $in_var = 10; ?> Web page output:
Successfully connected to Oracle.
Marco Magnani
Procedure returned value: 200 Procedure returned value: EVEN Warning: include(ads/text468x15.html): failed to open stream: No such file or directory in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Warning: include(): Failed opening 'ads/text468x15.html' for inclusion (include_path='.;C:\php\pear') in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Tutorial ![]() ![]() ![]() ![]() ![]() Script ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Comandi ![]() ![]() ![]() ![]() ![]() |
Cerca
Php...
Info:
Creare immagini con il codice
A good scientist is a person with original ideas.
A good engineer is a person who makes a design that works with as few original ideas as possible. There are no prima donnas in engineering. Freeman Dyson A good scientist is a person with original ideas.
A good engineer is a person who makes a design that works with as few original ideas as possible. There are no prima donnas in engineering. Freeman Dyson
Php...
Info:
Php's story
Php...
Definizioni:
PHP
Oracle...
Definizioni:
Variabile bind
Shell scripting...
Script:
Executing arithmetic operation in shell program
fishScript.Com is accessible by Mobile access technology
as mobile phones, Palm and Pocket PC .
Nicoleta e Marco Magnani tutorial, examples, courses, esempi, corsi, esercizi, appunti vari Dottoressa Nicoleta Dragu Formatrice Docente Insegnante Mediatrice Culturale Dott. Marco Magnani Universita La Sapienza Roma Master Computer Science Hunter College New York , Data Base Administrator DBA oracle System architect |