$select00->bind_param(1,$id,SQL_INTEGER)|| die $select00->errstr;
$select00->bind_param(3,$item,SQL_INTEGER)|| die $select00->errstr;
####
DBI::st=HASH(0x80f86e0)->bind_param(...): attribute parameter 'SQL_INTEGER' is n
ot a hash ref at ./dbtest.insert line 19.
####
#!/usr/bin/perl -w
#
#
use strict;
use DBI;
my $dsn="dbi:Pg:dbname=tabletest";
my $user="postgres";
my $passwd="";
#
#
#
my ($dbh,$id,$descr,$item,$latin);
$dbh = DBI->connect($dsn, $user, $passwd, { RaiseError => 1, AutoCommit => 0 });
my $select00 = $dbh->prepare('INSERT INTO hobby (id,descr,item,latin) VALUES (?,
?,?,?)')|| die $dbh->errstr;
$select00->bind_param(1,$id,SQL_INTEGER)|| die $select00->errstr;
$select00->bind_param(3,$item,SQL_INTEGER)|| die $select00->errstr;
my $csvfile="/home/bradley/dbtest/item_instk.csv";
open (CSV,"$csvfile");
while () {
chop;
$id = 1;
($item,$descr,$latin) = split /\//;
$select00->execute( $id, $descr, $item, $latin )||die $dbh->errstr;
++$id;
}
close CSV;
$dbh->disconnect;
####
Bareword "SQL_INTEGER" not allowed while "strict subs" in use at ./dbtest.insert
line 18.