DB::DBinterface - Perl extension for really simply access to database


NAME

DB::DBinterface - Perl extension for really simply access to database


SYNOPSIS

  use DB::DBinterface;
  use strict;
  my $dbo = DB::DBinterface(
        DBUSER => 'user' ,
        DBPASSWORD => 'p4ssw0rd',
        DBHOST => '192.168.0.20',
        DATABASE => 'my_database',
        DBTYPE => 'mysql'
  );
  my @results = $dbo->DBselect("SELECT * FROM users");
  $dbo->DBupdate("CREATE TABLE my_table (id_table tinyint, name_table varchar(200)");
  $dbo->DBupdate("INSERT INTO my_table VALUES(1,'toto')");
  my @results = $dbo->DBselect("SELECT * FROM my_table");
  print "====> Results for my_table <====\n\nID\tTABLE NAME\n---------------\n";
  foreach my $a (@results)
  {
        print "$a->{id_table}\t$a->{name_table}";
  }
  my @tab = $dbo->getRefTabShemaFromTable('my_table');
  print "Field for 'my_table' : $tab[0]->{Field}\n";
  my %schema = $dbo->getShemaHashFromTable('my_table');
  print "Type for 'my_table' : $schema{Type}\n";
  print


DESCRIPTION

DB::DBinterface provide an interface to DBI and DBD::* modules. It used DBI, so you might install it and the corresponding DBD driver if necessary.


FUNCTIONS


METHODS


AUTHOR

DUPUIS Arnaud, <a.dupuis@infinityperl.org>


COPYRIGHT AND LICENSE

Copyright (C) 2004 by DUPUIS Arnaud

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available.