to detect queries which doesn't return results
(like create temporary table)
git-svn-id: svn://svn.rot13.org/SQL2XLS@25
2e857b76-582b-47e5-ad5c-
b3ba0f0ee29b
my $sth = $dbh->prepare($sql);
$sth->execute();
- next unless $sth->{NAME}; # $sth->rows doesn't work for insert into with MySQL
+ next unless $sth->{NAME} && $sth->rows > 0; # $sth->rows alone doesn't work for insert into with MySQL
my @types = eval {
map { $dbh->type_info($_) ? $dbh->type_info($_)->{TYPE_NAME} : '?' } @{ $sth->{TYPE} };