I have this perl scrip that performs an accont lookup by last name. The perl scrip is executed by the webserver. A while loop is set up so that it will find all occurences of the specified last name and return it to the browser window. The loop will execute for 1001 times (i chose that becuase I didn't want variables in the while loop effecting how many times the loop is executed for debuging reasons) I have set up a print statement in the while loop to tell me when the while loop as looped again. Apparently, the loop execuation ceases to function once it hits the database and statement handler lines (I dont know which b/c the error logs show no indicaiton) If i take the selct statement and plug it into mysql directly it returns 8 rows of data:

Single mysql statment:
SELECT * FROM names where lastname = 'Gilmore';

Perl Script:

$count = 0;
while ($field_acct_id < 1000) {
print "<p>while loop initiated...</p>";
print "<p> $count </p>";
$sth = $dbh->prepare("SELECT * FROM names where lastname = $lookup_lname ");
@displayacct = $sth->fetchrow_array ();
$found_acctnum = $displayacct[0];
$found_prefix = $displayacct[1];
$found_firstname = $displayacct[2];
$found_middleinitial = $displayacct[3];
$found_lastname = $displayacct[4];
$found_suffix = $displayacct[5];

print "<p>$found_acctnum</p>";
print "<p>$found_prefix</p>";
print "<p>$found_firstname</p>";
print "<p>$found_middleinitial</p>";
print "<p>$found_lastname</p>";
print "<p>$found_suffix</p>";