Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Tie::DBI 1.02

    Download button

    No screenshots available
    Downloads: 514  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.7/5)
    12 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Lincoln Stein | More programs
    Perl Artistic License / FREE
    July 21st, 2008, 11:25 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Tie::DBI description

    Tie::DBI is a Perl module with tie hashes to DBI relational databases.

    Tie::DBI is a Perl module with tie hashes to DBI relational databases.

    SYNOPSIS

    use Tie::DBI;
    tie %h,'Tie::DBI','mysql:test','test','id',{CLOBBER=>1};

    tie %h,'Tie::DBI',{db => 'mysql:test',
    table => 'test',
    key => 'id',
    user => 'nobody',
    password => 'ghost',
    CLOBBER => 1};

    # fetching keys and values
    @keys = keys %h;
    @fields = keys %{$h{$keys[0]}};
    print $h{'id1'}->{'field1'};
    while (($key,$value) = each %h) {
    print "Key = $key:n";
    foreach (sort keys %$value) {
    print "t$_ => $value->{$_}n";
    }
    }

    # changing data
    $h{'id1'}->{'field1'} = 'new value';
    $h{'id1'} = { field1 => 'newer value',
    field2 => 'even newer value',
    field3 => "so new it's squeaky clean" };

    # other functions
    tied(%h)->commit;
    tied(%h)->rollback;
    tied(%h)->select_where('price > 1.20');
    @fieldnames = tied(%h)->fields;
    $dbh = tied(%h)->dbh;

    This module allows you to tie Perl associative arrays (hashes) to SQL databases using the DBI interface. The tied hash is associated with a table in a local or networked database. One column becomes the hash key. Each row of the table becomes an associative array, from which individual fields can be set or retrieved.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    tie hashes | DBI relational databases | Perl module | tie | hash | DBI

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM