1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| PROCEDURE ma_proc(name,fname,mdpwd,client)
--variables
BEGIN
--test client&utilisateur existent
select id_utl,nom,prenom,mdp,id_cli,nomcli INTO iduser,idcli...
from table_user,table_clients
where name=nom
and fname=prenom
and mdpwd=mdp
and client=nom_client; <---modification le 30/08 à 20h56
--test si utilisateur inscrit
select actif into a
from table_inscrit
where id_cli=idcli
and id_utl=iduser
if a=0 THen
raise
end if;
EXCEPTION
when no_data_found then
if iduser is null THEN
raise..
else
insert...
end if;
WHEN TOO_MANY_ROWS
THEN
DBMS_OUTPUT.PUT_LINE('Toomany ' || name ||' '||fname ||' '||mdpwd ||' '||client);
END; |