updated videos table

git-svn-id: http://yolanda.mister-muffin.de/svn@105 7eef14d0-6ed0-489d-bf55-20463b2d70db
main
josch 17 years ago
parent 40a1fc3405
commit d8aefc4997

@ -61,7 +61,7 @@ $dbh->do(qq{create table
derivativeworks bool not null,
sharealike bool not null,
commercialuse bool not null,
status int not null,
status int default 0,
primary key (id)
)
}) or die $dbh->errstr;
@ -92,6 +92,8 @@ $dbh->do(qq{create table
height smallint not null,
fps float not null,
hash char(64) not null,
viewcount int default 0,
downloadcount int default 0,
primary key (id),
fulltext (title, description, subject)
)

@ -26,7 +26,7 @@ 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, status, timestamp) values ( ?, ?, ?, 0, unix_timestamp())}) or die $dbh->errstr;
my $sth = $dbh->prepare(qq{insert into uploaded (title, description, userid, timestamp) values ( ?, ?, ?, unix_timestamp())}) or die $dbh->errstr;
$sth->execute($query->param("title"), $query->param("description"), $userid) or die $dbh->errstr;
$sth->finish() or die $dbh->errstr;

Loading…
Cancel
Save