Connector::Proxy::DBI
Use DBI to make a query to a database, supports calls to a single column only.
my $con = Connector::Proxy::DBI->new({ LOCATION => 'DBI:mysql:database=openxpki;host=localhost', dbuser => 'queryuser', password => 'verysecret', table => 'mytable', column => 1, condition => 'id = ?', });
Will return the value of the requested column of the matching row. If no row or more than one row is found, undef is returned (dies if die_on_undef is set).
Will return the selected column of all matching lines as a list. If no match is found undef is returned (dies if die_on_undef is set).
Will return scalar if the query has one result or list if the query has multiple rows. Returns undef if no rows are found.
not supported
2 POD Errors
The following errors were encountered while parsing the POD:
Unknown directive: =head
To install Connector, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Connector
CPAN shell
perl -MCPAN -e shell install Connector
For more information on module installation, please visit the detailed CPAN module installation guide.