Hi just wondering if it was possible to store an array in an sql database???
Here is my code:
my @ListOfSongs = param("songs");
my $dbh = DBI->connect("DBI:SQLite:sessions.db")
or die "Cannot connect: " . $DBI::errstr;
$sth = $dbh->prepare("UPDATE sessions SET contents = @ListOfSongs WHERE cartID = $cookie")
or die "Cannot prepare";
$sth->execute() or die "Cannot execute";
As you can see i have an array called @ListOfSongs which holds song titles. I want to store it in the array so that i can then pull it out later when it is needed.
Cheers
Here is my code:
my @ListOfSongs = param("songs");
my $dbh = DBI->connect("DBI:SQLite:sessions.db")
or die "Cannot connect: " . $DBI::errstr;
$sth = $dbh->prepare("UPDATE sessions SET contents = @ListOfSongs WHERE cartID = $cookie")
or die "Cannot prepare";
$sth->execute() or die "Cannot execute";
As you can see i have an array called @ListOfSongs which holds song titles. I want to store it in the array so that i can then pull it out later when it is needed.
Cheers