- or download this
package db_base;
use strict;
...
$sth->execute(@$data) && {$self->{param}->{success} = 1} || croak(
+"Cannot insert to $table: SQL = $sql\n $DBI::errstr\n$::backhtml");
}#sub
- or download this
use db_base;
my $dbobj = new db_base( 'dsn', 'user', 'pass');
$dbobj->connect;
$dbobj->insert( 'test_table', [ 'column' ], [ 'value' ]);
- or download this
Cannot insert to test_test_table: SQL = INSERT INTO `test_test_table`
+(`column`) values(?)
Table 'affiliate.test_test_table' doesn't exist
at c:/inetpub/wwwroot/cgi-bin/affiliate/db_base.pm line 52