return($self->{db}->cmd_firstcol($sql));
}
my $hasvals=$self->expecting_values();
- my $parent=$self->trailing_tag_parent();
- my @ids=();
my $sql="SELECT tags.name FROM ";
if($self->in_or())
{
my $id=$self->trailing_tag_id();
my $parentclause= "tags.parents_id='";
- if($hasvals)
- {
- $parentclause .= $id;
- }
- elsif($parent)
- {
- $parentclause .= $parent;
- }
+ $parentclause .= $id if($hasvals);
$parentclause .= "'";
push(@andclauses, $parentclause);
my $sql="SELECT DISTINCT name FROM artists WHERE name!='';";
return($self->{db}->cmd_firstcol($sql));
}
- my @ids=();
my $sql=$self->sql_start("artists.name");
$sql .= ("INNER JOIN artists ON files.artists_id=artists.id\n" .
"WHERE artists.name != ''\n" .
sub albums
{
my($self)=@_;
- my @ids=();
my $tail=$self->tail();
if($self->is($TYPE_ARTIST, $tail))
{