-------------------------------------------------------------------------------- -- exemples_php.txt -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- toto.txt -------------------------------------------------------------------------------- ici toto.txt ok -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_php1.php -------------------------------------------------------------------------------- voici y : ".$y; ?> -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_php_mp.sql -------------------------------------------------------------------------------- drop table produit; create table produit (nom varchar2(30), prix integer, qte integer); select * from produit; insert into produit values ('cours Java', 10, 7); select * from produit; select * from produit; -- le cours Java est toujours la insert into produit values ('cours BD', 50, 3); insert into produit values ('cours baby-sitting', 70, 50); insert into produit values ('cours tango argentin', 100, 3); insert into produit values ('cours sieste', 200, 1); select * from produit; create or replace procedure p(x integer, y out integer) as begin y:=x+1; end; / create or replace function f(x integer) return integer as begin return (x+1); end; / create or replace procedure q(x varchar2, y out varchar2) as begin y:=x||' : OK '; end; / -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_familiarisation.html -------------------------------------------------------------------------------- ex_familiarisation.html
Entrez le budget maximum par cours :
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_familiarisation.php -------------------------------------------------------------------------------- cours de prix inferieur ou egal a :
"; $ordre = ociparse($connection, $texte); ociexecute($ordre); while(ocifetchinto($ordre, $ligne)) echo $ligne[0].",".$ligne[1]."
"; ocilogoff($connection); ?> -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_html1.php -------------------------------------------------------------------------------- fichier ex_html1.html

Entreprise Aux p'tits cours

Bienvenue ! Vous ne serez pas déçus
Tout, tout, tout, vous saurez tout sur...

Vous pouvez entrez un prix et vous verrez la liste des produits de prix inférieur ou égal

Entrez le budget maximum par cours :
-------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_php_mp2.php -------------------------------------------------------------------------------- mise a jour - fichier ex_php_mp2.php

Entreprise Aux p'tits cours

Voici le stock :
"; $ordre = ociparse($connection, $texte); ociexecute($ordre); ocilogoff($connection); echo 'Coucou'; ?> -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ex_php_mp_3_out.php -------------------------------------------------------------------------------- Ajout fonction procedure stockee"; if ($connexion=ocilogon("waller_a","AQWzsx34", "dbinfo")){ echo "Connection OK
"; } $texte="begin :res := f(:x) ; end;"; $ordre=ociparse($connexion, $texte); $x=3; ocibindbyname($ordre, ':res', $res); ocibindbyname($ordre, ':x', $x); ociexecute($ordre); echo "f($x)=$res
"; $texte="begin p(:x,:res); end;"; $ordre=ociparse($connexion, $texte); $x=7; ocibindbyname($ordre, ':res', $res); ocibindbyname($ordre, ':x', $x); ociexecute($ordre); echo "p($x,...) retourne $res
"; $texte="begin q(:x,:res); end;"; $ordre=ociparse($connexion, $texte); $x='super'; ocibindbyname($ordre, ':x', $x); ocibindbyname($ordre, ':res', $res, 100); // valeur exacte selon chaine retour ociexecute($ordre); echo "q($x,...) retourne $res"; ?> --------------------------------------------------------------------------------