Skip to content
Browse files

Merge pull request #2056 from skywalker666/master

Issue #13810: This should fix the DELETE statement for MySQL (UNTESTED!).
  • Loading branch information...
2 parents c79c5d5 + 7e0a425 commit a72b57bfc3165312f898858ca3ef1aa1dad6b05a @opdenkamp opdenkamp committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 xbmc/pvr/PVRDatabase.cpp
4 xbmc/pvr/PVRDatabase.cpp
@@ -609,8 +609,8 @@ 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 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);
+ CStdString strQuery = FormatSQL("DELETE m FROM map_channelgroups_channels m LEFT JOIN channels c ON (c.idChannel = m.idChannel) WHERE c.idChannel IS NULL");
+ bDelete = ExecuteQuery(strQuery);
if (group.m_members.size() > 0)

1 comment on commit a72b57b

Team Kodi member

@skywalker666 please don't put this "UNTESTED!" stuff in the commit note for a PR next time, only in the PR description if it wasn't tested.

Please sign in to comment.
Something went wrong with that request. Please try again.