in reply to Re: Need help with Insert
in thread Need help with Insert

Did you test this?

I had to insert the missing semicolon in order to test

$sthsql->execute( join(', ' , @row) );
and then I got
execute failed: There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

What happens is that DBI spots the imbedded quotes in the joined string and cleverly escapes them.

See also Can a DBI Placeholder accept multiple values?

Replies are listed 'Best First'.
Re: Joining bind values doesn't work
by driver8 (Scribe) on Mar 14, 2008 at 11:35 UTC
    No, I didn't test it. I don't have a lot of DBI experience, and I don't have a DB running at the moment. Thanks for pointing out the error and the right way to do it. -driver8