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 ( [id://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.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found