| Perlbug documentation | view source | Contained in the Perlbug distribution. |
Perlbug::Database - Bug support functions for Perlbug
Access to the database for Perlbug
my $o_db = Perlbug::Database->new(@args);
my $sth = $o_db->query('show tables');
my @tables = $sth->fetchrow_array; # yek (should move get_list|data() from Base to here)
print "tables: @tables\n";
Get a new db object
my $o_db = Perlbug::Database->new(@args);
Quote the given string/s to 'sql\'s'
my $quoted = $o_db->quote($sql);
Return the appropriate comparison operator: LIKE or =
my $comp = $o_db->comp($str);
Returns database handle for queries
my $o_dbh = $o_db->dbh;
DBConnect() checks to see if there is an open connection to the Savant database, opens one if there is not, and returns a global database handle. This eliminates opening and closing database handles during a session. undef is returned
Return sth from given query
my $sth = $o_db->query($sql);
Return given args(column, string) as case sensitive match
my $sql = $o_db->case_sensitive('format', 'H');
Richard Foley perlbug@rfi.net Oct 1999 2000 2001
From original work by Chris Masto chrism@netmonger.net
| Perlbug documentation | view source | Contained in the Perlbug distribution. |