Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixes GetRandomMusicVideo query on mysql

  • Loading branch information...
commit bf913624585bc21ebe3a870c51f28872ef41163c 1 parent 7118b76
Jonathan Marshall authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  xbmc/video/VideoDatabase.cpp
3  xbmc/video/VideoDatabase.cpp
View
@@ -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()))
Please sign in to comment.
Something went wrong with that request. Please try again.