Then, why didn't it work?
-----Original Message-----
From: Ronald J Kimball [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 1:56 PM
To: Jones Robert Contr TTMS Keesler
Cc: '[EMAIL PROTECTED]'
Subject: Re: Problems doing INSERT
On Mon, Jul 21, 2003 at 01:47:21PM -0500, Jones Robert Contr TTMS Keesler
wrote:
>
> Execute expects an array.
>
> $sth->execute( ($host, $mensaje) ) or die $dbh ->errstr;
> $sth->execute( @myinsertdata ) or die $dbh ->errstr;
Execute does not expect an array. It expects a list, which may come from
an array or a list of values. Very few functions in Perl require an actual
array.
These two lines of code are exactly equivalent:
$sth->execute( ($host, $mensaje) )
$sth->execute( $host, $mensaje )
Ronald