Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Sybase Perl DBI

by Anonymous Monk
on Oct 18, 2012 at 20:15 UTC ( #999815=note: print w/ replies, xml ) Need Help??


in reply to Sybase Perl DBI

Is there a reason you are using Sybase::DBlib instead of the more usual DBI?

DBI has a handy selectcol_arrayref() function which folds a single-column resultset into an array reference.

sub sa_details { my $dbh = ... return $dbh->selectcol_arrayref( qq{SELECT userid FROM user} ); } my $arrayref = sa_details();

(Usually you use DBI with the prepare-execute-fetch combination, though. The select{row,all,col} functions are there just for convenience.)


Comment on Re: Sybase Perl DBI
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2015-07-03 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls