Skip to content

Commit

Permalink
fixes GetRandomMusicVideo query on mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed May 12, 2013
1 parent 7118b76 commit bf91362
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xbmc/video/VideoDatabase.cpp
Expand Up @@ -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()))
Expand Down

0 comments on commit bf91362

Please sign in to comment.