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"
In reply to Re: Empty Hash?
by strat
in thread Empty Hash?
by perleager
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |