projects
/
id3fs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6705135
)
tags sql tweaks
author
Ian Beckwith
<ianb@erislabs.net>
Sun, 3 Oct 2010 19:13:04 +0000
(20:13 +0100)
committer
Ian Beckwith
<ianb@erislabs.net>
Sun, 3 Oct 2010 19:13:04 +0000
(20:13 +0100)
lib/ID3FS/DB.pm
patch
|
blob
|
history
diff --git
a/lib/ID3FS/DB.pm
b/lib/ID3FS/DB.pm
index
a9d01c7
..
808ff11
100644
(file)
--- a/
lib/ID3FS/DB.pm
+++ b/
lib/ID3FS/DB.pm
@@
-203,10
+203,8
@@
sub tags
use Data::Dumper;
print "TAGS: ", Dumper \@tags;
print "VALS: ", Dumper \@tags_vals;
use Data::Dumper;
print "TAGS: ", Dumper \@tags;
print "VALS: ", Dumper \@tags_vals;
- if(defined($parent))
- {
- push(@andclauses, "( t2.parents_id=$parent )");
- }
+
+ push(@andclauses, "( t2.parents_id=" . (defined($parent) ? $parent : "''") . " )");
if(@tags)
{
push(@orclauses, "( t2.parents_id='' AND t2.id NOT IN ( " . join(', ', @tags) ." ) )");
if(@tags)
{
push(@orclauses, "( t2.parents_id='' AND t2.id NOT IN ( " . join(', ', @tags) ." ) )");
@@
-411,10
+409,7
@@
sub tags_subselect
my($tag, $val)=@$pair;
push(@orclauses, "( t1.parents_id=$tag AND t1.id=$val )");
}
my($tag, $val)=@$pair;
push(@orclauses, "( t1.parents_id=$tag AND t1.id=$val )");
}
- if($parent)
- {
- push(@andclauses, "( t1.parents_id=$parent )");
- }
+# push(@andclauses, "( t1.parents_id=" . (defined($parent) ? $parent : "''") . " )");
if(@orclauses)
{
push(@andclauses, join("\n\t\tOR ", @orclauses));
if(@orclauses)
{
push(@andclauses, join("\n\t\tOR ", @orclauses));