[pvr] fix channel import for mysql backends. closes #13810
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 8 Jan 2013 00:45:58 +0000 (01:45 +0100)
committerS. Davilla <davilla@4pi.com>
Wed, 9 Jan 2013 14:04:17 +0000 (09:04 -0500)
xbmc/pvr/PVRDatabase.cpp

index 586c5ac..395757c 100644 (file)
@@ -609,7 +609,7 @@ bool CPVRDatabase::RemoveStaleChannelsFromGroup(const CPVRChannelGroup &group)
   if (!group.IsInternalGroup())
   {
     /* First remove channels that don't exist in the main channels table */
-    CStdString strWhereClause = FormatSQL("idChannel IN (SELECT map_channelgroups_channels.idChannel FROM map_channelgroups_channels LEFT JOIN channels on map_channelgroups_channels.idChannel = channels.idChannel WHERE channels.idChannel IS NULL)");
+    CStdString strWhereClause = FormatSQL("idChannel IN (SELECT m.idChannel FROM map_channelgroups_channels m LEFT JOIN channels on m.idChannel = channels.idChannel WHERE channels.idChannel IS NULL)");
     bDelete = DeleteValues("map_channelgroups_channels", strWhereClause);
   }