Re: out of memory
- From: ron@xxxxxxxxxxxxx (Ron Savage)
- Date: Sat, 30 Dec 2006 13:28:30 +1100
On Fri, 29 Dec 2006 14:28:32 -0800, louis fridkis wrote:
Hi Louis
Thanks for the suggestions. But, wouldn't it just be better to
switch back to using fetchrow_array()? Is there any advantage to
using bind_columns in this case?
Sometimes 'better' refers to personal preference rather than a clear-cut matter
of coding convention or style. I'd say suit yourself, unless there is a clear
advantage doing things in one particular way.
This is from my tiny list of DBI best practices:
Use prepare_cached(), and then:
$sth->execute;
my %row;
$sth->bind_columns( \( @row{ @{$sth->{NAME_lc} } } ));
while ($sth->fetch)
{
print "$row{region}: $row{sales}\n";
}
Actually, I'd like to see a best practices doc alongside the DBI doc, unless
there is already such a doc (and I'm sure I'll get told if there is).
--
Cheers
Ron Savage, ron@xxxxxxxxxxxxx on 30/12/2006
http://savage.net.au/index.html
Let the record show: Microsoft is not an Australian company
.
- References:
- Re: out of memory
- From: Louis Fridkis
- Re: out of memory
- Prev by Date: Re: out of memory
- Next by Date: Re: out of memory
- Previous by thread: Re: out of memory
- Next by thread: Re: out of memory
- Index(es):