in reply to Re: MySQL INSERT in Perl
in thread MySQL INSERT in Perl

use SQL::Abstract; my $SQL = SQL::Abstract->new; ... my ($sql, @bind) = $SQL->insert ($table, \%h1); $dbh->do ($sql, {}, @bind);

Replies are listed 'Best First'.
Re^3: MySQL INSERT in Perl
by baperl (Sexton) on Aug 04, 2011 at 15:00 UTC
    thx superdoc, I'm not sure I fully understand how that will work... also, it seems like I should replace prepare/execute with do()?

      SQL::Abstract generates (simple) sql statement from perl data structures.

      Yes, you can replace prepare/execute everywhere you don't care about returned rows or rows are not returned, like insert/update/delete without returning clause. See DBI#do

        sounds good...thanks!