Skip to content
Browse files

fixes GetRandomMusicVideo query on mysql

  • Loading branch information...
1 parent 7118b76 commit bf913624585bc21ebe3a870c51f28872ef41163c Jonathan Marshall committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 xbmc/video/VideoDatabase.cpp
3 xbmc/video/VideoDatabase.cpp
@@ -7411,7 +7411,8 @@ bool CVideoDatabase::GetRandomMusicVideo(CFileItem* item, int& idSong, const CSt
// We don't use PrepareSQL here, as the WHERE clause is already formatted.
CStdString strSQL;
- strSQL.Format("select * from musicvideoview where %s order by RANDOM() limit 1",strWhere.c_str());
+ strSQL.Format("select * from musicvideoview where %s",strWhere.c_str());
+ strSQL += PrepareSQL(" order by RANDOM() limit 1");
CLog::Log(LOGDEBUG, "%s query = %s", __FUNCTION__, strSQL.c_str());
// run query
if (!m_pDS->query(strSQL.c_str()))

0 comments on commit bf91362

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