summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@ens-lyon.org>2012-01-14 14:24:16 +0100
committerGuilhem Moulin <guilhem.moulin@ens-lyon.org>2012-01-14 14:24:16 +0100
commit4484b8028cab08638f282426fceaf0d8da0a6ad2 (patch)
tree7bcfa7031525ddb8b1f25520c538794d7b0519c3
parent414dbdb795210c3caf1e29c95b02da188fd7d155 (diff)
bug
-rwxr-xr-xvideoadd.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/videoadd.pl b/videoadd.pl
index fb978ad..eed8b86 100755
--- a/videoadd.pl
+++ b/videoadd.pl
@@ -208,21 +208,23 @@ if ( defined($file) ) {
unless ( defined $ignoredb_flag ) {
my $INSERT = "INSERT INTO $config{videodata}
SET mediatype = 14";
- if (defined $config{filedate}) {
- $INSERT .= ", FROM_UNIXTIME($config{filedate})";
- delete $config{filedate};
+ if (defined $new{filedate}) {
+ $INSERT .= ", FROM_UNIXTIME($new{filedate})";
+ delete $new{filedate};
}
while (my ($k,$v) = each %new) {
$INSERT .= ", " .$k. " = " .$dbh->quote ($v);
}
# $dbh->do($INSERT) or die "Can't insert: $!\n";
+ print $INSERT, "\n";
my $ids = $dbh->selectall_arrayref ( "SELECT id FROM $config{videodata}
WHERE filename = ? ",
undef, $new{filename} );
if ($#$ids == 0) {
- print LOG $config{url}, "/show.php?id=", $ids->[0]->[0], "\n"
+ print LOG "See the result there: ",
+ $config{url}, "/show.php?id=", $ids->[0]->[0], "\n"
or die "Can't print: $!";
}
else {