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


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



© 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