Dear monks
This may be a silly question, but I haven't found a solution. I want to create a table in a Sqlite database with the column names passed to the statement as an array. The number of columns should correspond to the number of elements of the array and the column names to the values of each element. The following doesn't work.
my @columns = qw/author year day month/; my $dbh = DBI->connect( "dbi:SQLite:my.db" ) || die "Cannot connec +t: $DBI::errstr"; $dbh->do( "CREATE TABLE Data (@columns )" ); $dbh->disconnect;
Is it possibile to achive what I described?
In reply to DBI Sqlite create table dynamically by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |