Bio::DOOP::DBSQL - MySQL control object
Version 0.04
$db = Bio::DOOP::DBSQL->connect("doopuser","dooppass","database","localhost"); $res = $db->query("SELECT * FROM sequence LIMIT 10"); foreach (@$res) { @fields = @{$_}; print "@fields\n"; }
This object provides low level access to the MySQL database. In most cases you do not need to use it, because the DOOP API handles the database queries. Still if you need some special query and the DOOP API can't help you, use the query method to access the database.
Tibor Nagy, Godollo, Hungary and Endre Sebestyen, Martonvasar, Hungary
$db = Bio::DOOP::DBSQL->connect("doopuser","dooppass","database","localhost"); You can connect to the database with this method. The arguments are the following : username, password, database name, host. The return value is a Bio::DOOP::DBSQL object. You must use this object in the argument of other objects.
$db->query("SELECT COUNT(*) FROM Cluster;"); You can run special SQL statements on the database. In this example we count the number of clusters. Returns an arrayref to the results.
To install Bio::DOOP::DOOP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::DOOP::DOOP
CPAN shell
perl -MCPAN -e shell install Bio::DOOP::DOOP
For more information on module installation, please visit the detailed CPAN module installation guide.