tags: AND limit clauses together
authorIan Beckwith <ianb@erislabs.net>
Sun, 10 Oct 2010 23:33:29 +0000 (00:33 +0100)
committerIan Beckwith <ianb@erislabs.net>
Sun, 10 Oct 2010 23:33:29 +0000 (00:33 +0100)
lib/ID3FS/Path.pm

index 0559463..ee8353d 100644 (file)
@@ -477,18 +477,18 @@ sub tags
            $clause .= " AND tags.id NOT IN (" . join(', ', @values) . ")";
        }
        $clause .= ")";
-       push(@orclauses, $clause);
+       push(@andclauses, $clause);
     }
     else
     {
 #      print "HASNT VALUES\n";;
        if(@used)
        {
-           push(@orclauses, "(NOT (tags.parents_id='' AND tags.id IN (" . join(', ', @used) . ")))");
+           push(@andclauses, "(NOT (tags.parents_id='' AND tags.id IN (" . join(', ', @used) . ")))");
        }
        for my $pair (@used_with_vals)
        {
-           push(@orclauses, "(NOT (tags.parents_id='" . $pair->[0] . "' AND tags.id='" . $pair->[1] . "'))");
+           push(@andclauses, "(NOT (tags.parents_id='" . $pair->[0] . "' AND tags.id='" . $pair->[1] . "'))");
        }
     }