It seems that the query object in both the while loop and the subroutine is one and the same ($qry) since I don't see a my $qry; anywhere in the subroutine.
You $qry->finish(); it in the subroutine, so you can't fetch anything anymore in the while.
Hope this helps, -gjb-
In reply to Re: Nesting SELECT statements
by gjb
in thread Nesting SELECT statements
by heezy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |