I strongly recommend that you use strictures (use strict; use warnings;). In this case your attention would have been drawn to the assignment to $sql which interpolates two undeclared variables ($dday, $msdn). It is interesting to note that these variables are given values inside a loop, but too late to affect the contents of $sql.
You need to construct $sql inside to loop after the variables have been initialized.
In reply to Re: Looping an SQL query
by GrandFather
in thread Looping an SQL query
by rickphil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |