in reply to Empty Hash?
For many databases, $sth->rows() returns how many lines are returned. If the DB can't do that, -1 is returned instead; then check the documentation of the DBD (e.g. perldoc DBD::mysql) if there is a special attribute or method which either gives you the ammount of rows or tells you that no more rows are available. If there is a method that tells you that no more results are available (e.g. with sybase), just check it before you fetch the data (e.g. before the while-loop) to find out if there is no data returned
Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Empty Hash?
by jZed (Prior) on Dec 31, 2004 at 16:54 UTC | |
by superfrink (Curate) on Jan 01, 2005 at 01:16 UTC | |
|
Re^2: Empty Hash?
by mpeppler (Vicar) on Jan 03, 2005 at 19:11 UTC |