aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2015-01-17 09:09:56 +0100
committermontellese <montellese@xbmc.org>2015-01-17 09:09:56 +0100
commit37dd3cbd7caf78baab5b62b015dc7e9c54b09356 (patch)
tree9106d49e70a2494f752f715b97541bcc1f3f84b5
parentb99142f870b24cefa0ba8baf39676fcd234a67d2 (diff)
videodb: potentially fix SQL query in GetRandomMusicVideo
-rw-r--r--xbmc/video/VideoDatabase.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp
index 44eadbe70b..31060e349a 100644
--- a/xbmc/video/VideoDatabase.cpp
+++ b/xbmc/video/VideoDatabase.cpp
@@ -7214,10 +7214,9 @@ bool CVideoDatabase::GetRandomMusicVideo(CFileItem* item, int& idSong, const std
if (NULL == m_pDB.get()) return false;
if (NULL == m_pDS.get()) return false;
- // We don't use PrepareSQL here, as the WHERE clause is already formatted.
std::string strSQL = "select * from musicvideo_view";
if (!strWhere.empty())
- strSQL += PrepareSQL(" where %s", strWhere.c_str());
+ strSQL += " where " + strWhere;
strSQL += PrepareSQL(" order by RANDOM() limit 1");
CLog::Log(LOGDEBUG, "%s query = %s", __FUNCTION__, strSQL.c_str());
// run query