Basic HTML version of Foils prepared 7 October 97

Foil 41 An Example in OraPerl - Query a Person's Phone Number By Last or First Name - II

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


1 # Open cursor and execute the query
2 $csr = &ora_open($lda, $phone_cursor);
3 # Assign actual value in the SQL statement
4 &ora_bind($csr, 'geoffrey');
5 # Fetch the query results into array variables and print them out
6 while (($lname,$fname,$phone,$ptype) =&ora_fetch($csr))) {
7 print "The $ptype $phone no. of $fname $lname:$phone\n";}
8 &ora_close($csr); # Close a cursor
9 &ora_logoff($lda); # disconnect the database server

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 Thu Feb 5 1998