I have problems with the @values array, because the $db->do function wont split it into separate values. Is there a good way to separate it automatically? I'd like to insert full rows, so i'll pass as many values to this function as many columns are in the table. Thank You for your help!sub insert_element { my $table = pop @_; my @values = @_; $db->do("insert into '$table' values ('@values')") or my $error = +$db->errstr; if (defined($error)) { die syslog('info',"insert: $error +"); } }
In reply to DBI Sqlite insert function by ScOut3R
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |