tags are now seperated by spaces

git-svn-id: http://yolanda.mister-muffin.de/svn@208 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2007-12-18 00:41:02 +00:00
parent 61542c25df
commit 1968a6c066

View file

@ -13,13 +13,16 @@ $sth = $dbh->prepare("select subject from videos");
$sth->execute(); $sth->execute();
while(($subject) = $sth->fetchrow_array()) while(($subject) = $sth->fetchrow_array())
{ {
@subject = split(',', $subject); @subject = split(' ', $subject);
foreach my $val (@subject) foreach my $val (@subject)
{ {
$val =~ s/^\s*(.*?)\s*$/$1/; $val =~ s/^\s*(.*?)\s*$/$1/;
if(length($val) >= 4)
{
%hash->{$val}++; %hash->{$val}++;
} }
} }
}
$sth->finish(); $sth->finish();
@sorted = sort {$hash{$b} cmp $hash{$a}} keys %hash; @sorted = sort {$hash{$b} cmp $hash{$a}} keys %hash;