Basic HTML version of Foils prepared 7 October 97

Foil 28 The PL/SQL Package For Phone Example - II

From Untitled presentation ARL Database Tutorial -- February 98. by Gang Cheng, C.W. Ou, Geoffrey C. Fox


1 BEGIN
  • htp.htitle('Query Results');
  • htp.ulistOpen;
  • OPEN person_cur(name); -- open the cursor
  • LOOP; -- Fetch each row matching the query into variables repeatedly
  • FETCH person_cur INTO lname,fname,phone,ptype;
  • EXIT WHEN person_cur%NOTFOUND; -- check end of result buffer
2 /* print out the query result */
3 htp.p(htp.item||'The ' || ptype ||' phone no. of ' || fname || ' '
4 || lname || ': ' || phone);
5 END LOOP;
6 CLOSE person_cur; -- close the cursor after it is done
7 htp.ulistClose;
8 END get_person_by_name;
9 END EXAMPLE;

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Feb 7 1998