On Sun, 17 Dec 2000, quagly wrote:
>
> As a test of my new mod_perl abilities I wrote a trivial SQL client.
> It works, but if the query returns many rows then it takes a while.
> As a first step I thought I would call $r->rflush; with every row
> printed but
> this does not work. I also tried $|=0; with no effect.
$|=1 or $|++
$|=0 is the opposite (do bufferring!)
> while ($sth->fetch) {
> print "",
> map("$_",@cols),
> $r->rflush;
> }
How about this?
while ($sth->fetch) {
print "",map("$_",@cols);
$r->rflush;
}
You may also want to find some nice value and do:
my $rows = 0;
while ($sth->fetch) {
print "",map("$_",@cols);
# flush every 10 rows
$r->rflush unless ++$rows % 10;
}
_
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/