in reply to Re^2: DBI Problem
in thread DBI Problem
Hello tultalk,
You need to debug step by step your operations. Insert errstr on prepare and execute and see the output. I do not think so the way that you are using it currently is working correctly. Sample of code untested:
my $sth = $dbh->prepare($SQL) or die $dbh->errstr; $sth->execute() or die $dbh->errstr; $dbh->commit or die $dbh->errstr;
See also commit.
You need also to check your call fetchrow_array since you are jumping from one note to the other. Sample of code untested:
while (($tsid, $userid) = $sth->fetchrow_array) { print "$tsid: $userid\n"; } # check for problems which may have terminated the fetch early die $sth->errstr if $sth->err;
Hope this helps, BR.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: DBI Problem
by tultalk (Monk) on Sep 29, 2017 at 11:30 UTC | |
by thanos1983 (Parson) on Sep 29, 2017 at 12:05 UTC | |
by tultalk (Monk) on Sep 29, 2017 at 12:48 UTC | |
by thanos1983 (Parson) on Sep 29, 2017 at 15:01 UTC |