I have a simple routine where I am retrieving records from a MySQL database. The query should return anywhere from 25-100 records. I am then writing the results to a text file. If I limit the search results to 2 or less, it works fine. Anything more than that times out. The problem is in the writing of the file; if I eliminate the file output section, the script runs without incidence.
Here is the code:
#select the fields from the database
$dbh = gsm::connect ();
$sth=$dbh->prepare ("select * from meetings order by meetings.id");
$sth->execute ();
#process the columns received, one at a time
while ((@report)=$sth ->fetchrow_array()) {
foreach(@report) {
print SAVE "$_\t";
shift (@report);
}
print SAVE "\n";
}
#cleanup
$sth->finish;
$dbh->disconnect();
close SAVE;
#html code replies that everything works (not shown)
2004-12-20 Janitored by Arunbear - added code tags, as per Monastery guidelines