From what I understand from your post, you want to convert the array @values to a string that has the array's values comma separated, as that would be the correct SQL syntax. So, if you have an array:
@values = (
1,
2,
3
);
and you want to put that into the SQL query you'll have to join the values:
my $str_values = join(', ', @values);
# $str_values is now '1, 2, 3'
...
$db->do("insert into $table values ($str_values)") ...
...
Still, I strongly advise the reading of the info on placeholders. |