Using the latest from CVS as of today. If I select a
group and show all songs (intending to add or remove
songs from the group), songs that are in multiple
groups show up multiple times in the listing. This
patch makes sure that songs will only appear once.
--- www/right.php 3 Jan 2005 20:24:57 -0000
1.21
+++ www/right.php 23 Jul 2005 14:56:47 -0000
@@ -810,7 +810,7 @@
}
else
- $query="select
a.id,a.artist,a.title,$extra,if(b.groupid!=$group,NULL,b.groupid)$listcols
".
+ $query="select distinct
a.id,a.artist,a.title,$extra,if(b.groupid!=$group,NULL,b.groupid)$listcols
".
"from songs a ".
"left join groupmember b on ".
Logged In: YES
user_id=17186
Darn... that patch works if the track is not in the group
you're looking at, but not if it is.
Logged In: YES
user_id=17186
Updated patch, I think this works:
--- www/right.php 3 Jan 2005 20:24:57 -0000 1.21
+++ www/right.php 23 Jul 2005 15:26:40 -0000
@@ -810,7 +810,7 @@
}
else
- $query="select
a.id,a.artist,a.title,$extra,if(b.groupid!=$group,NULL,b.groupid)$listcols
".
+ $query="select
a.id,a.artist,a.title,$extra,max(if(b.groupid!=$group,-1,b.groupid))$listcols
".
"from songs a ".
"left join groupmember b on ".
@@ -818,6 +818,7 @@
"left join groups c on ".
"b.groupid = c.id ".
$select.
+ " group by
a.id,a.artist,a.title,volume".
" order by $sortc, title$limit";
} else{