joec_ has asked for the wisdom of the Perl Monks concerning the following question:
I am returning rows from a cursor in Oracle and printing out the column values. I want to be able to check if rows have been returned. Could any one provide an example of how to do this checking?
For example
Thanks- i know it should be simplewhile ($row = $cursor->fetchrow_arrayref){ print $row->[0],",",$row->[1]; ### If no rows are returned, print EMPTY ### I tried using if (!defined($row->[0])) but that didnt work }
Joe
-----
Eschew obfuscation, espouse elucidation!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Check if no rows are returned from Oracle
by ikegami (Patriarch) on May 21, 2009 at 17:02 UTC |