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

NAME

CTK::DBI - Database independent interface for CTKlib

VERSION

Version 2.25

REVISION

$Revision: 180 $

SYNOPSIS

    use CTK::DBI;

    # MySQL connect
    my $mso = new CTK::DBI(
            -dsn        => 'DBI:mysql:database=TEST;host=192.168.1.1',
            -user       => 'login',
            -pass       => 'password',
            -connect_to => 5,
            -request_to => 60
            #-attr      => {},
        );
    
    my $dbh = $mso->connect;
    
    # Table select (as array)
    my @result = $mso->table($sql, @inargs);

    # Table select (as hash)
    my %result = $mso->tableh($key, $sql, @inargs); # $key - primary index field name

    # Record (as array)
    my @result = $mso->record($sql, @inargs);

    # Record (as hash)
    my %result = $mso->recordh($sql, @inargs);

    # Fiels (as scalar)
    my $result = $mso->field($sql, @inargs);

    # SQL
    my $sth = $mso->execute($sql, @inargs);
    ...
    $sth->finish;

DESCRIPTION

For example: debug($oracle->field("select sysdate() from dual"));

AUTHOR

Serz Minus (Lepenkov Sergey) http://www.serzik.com <minus@mail333.com>

COPYRIGHT

Copyright (C) 1998-2014 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms and conditions as Perl itself.

This program is distributed under the GNU LGPL v3 (GNU Lesser General Public License version 3).

See LICENSE file