in reply to Re: Can a DBI Placeholder accept multiple values?
in thread Can a DBI Placeholder accept multiple values?
You would need to replace (?) with the number of array elements e.g
$val = " ";
for( $j = 0; $j < @id;$j++)
$val .= "?,";
}
$val = substr($val,0,-1);
$query = $dbh->prepare("REPLACE INTO $tbl ($col) VALUES ($val)");
and then $query->execute(@id);
works fine (tested with DBI:mysql)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Can a DBI Placeholder accept multiple values?
by igelkott (Priest) on May 13, 2008 at 14:45 UTC |
In Section
Seekers of Perl Wisdom