The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::DOOP::DBSQL - MySQL control object

VERSION

Version 0.06

SYNOPSIS

  $db  = Bio::DOOP::DBSQL->connect("user","pass","database","localhost");

  $res = $db->query("SELECT * FROM sequence LIMIT 10");

  foreach (@$res) {
     @fields = @{$_};
     print "@fields\n";
  }

DESCRIPTION

This object provides low level access to the MySQL database. In most cases you do not need 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.

AUTHORS

Tibor Nagy, Godollo, Hungary and Endre Sebestyen, Martonvasar, Hungary

METHODS

connect

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 arguments of other objects.

  $db = Bio::DOOP::DBSQL->connect("user","pass","database","localhost");

query

You can run special SQL statements on the database. In this example we count the number of clusters.

Returns an arrayref with the results of the MySQL query.

  $db->query("SELECT COUNT(*) FROM cluster;");