added additional dc elements

git-svn-id: http://yolanda.mister-muffin.de/svn@111 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-10-21 19:17:36 +00:00
parent 89402973b2
commit 5c8958484b

View file

@ -26,8 +26,13 @@ if($userid)
my $dbh = DBI->connect("DBI:mysql:$database:$host", $dbuser, $dbpass) or die $dbh->errstr;
#make new entry for video into the databse
my $sth = $dbh->prepare(qq{insert into uploaded (title, description, userid, timestamp) values ( ?, ?, ?, unix_timestamp())}) or die $dbh->errstr;
$sth->execute($query->param("DC.Title"), $query->param("DC.Description"), $userid) or die $dbh->errstr;
#FIXME: contributor, rights
my $sth = $dbh->prepare(qq{insert into uploaded (title, description, userid, timestamp,
creator, subject, contributor, source, language, coverage, rights)
values ( ?, ?, ?, unix_timestamp(), ?, ?, ?, ?, ?, ?, ? )}) or die $dbh->errstr;
$sth->execute($query->param("DC.Title"), $query->param("DC.Description"), $userid,
$query->param("DC.Creator"), $query->param("DC.Subject"), '', $query->param("DC.Source"),
$query->param("DC.Language"), $query->param("DC.Coverage"), '') or die $dbh->errstr;
$sth->finish() or die $dbh->errstr;
#get the id of the inserted db entry