On Fri, 27 Apr 2001, Micah Cowan wrote:

> On Fri, Apr 27, 2001 at 03:28:58PM -0500, Jay Strauss wrote:
> > In DBI there is:
> > 
> >       $ary_ref = $dbh->selectrow_arrayref($statement);
> >       @row_ary = $dbh->selectrow_array($statement);
> > 
> > but only
> > 
> >       $ary_ref = $dbh->selectcol_arrayref($statement);
> > 
> > Why??? (i.e why no @col_ary = $dbh->selectcol_array($statement))
> 
> Dunno.  You'll have to ask the author  :)

I think this would encourage inefficient programming constructs, because
such a function would imply a complete iteration through all the rows and
columns while ignoring all but one.  It is more efficient to use a query
that only returns the single column you are interested in.

[...]

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
Work:<[EMAIL PROTECTED]>              Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------

Reply via email to