diff options
author | montellese <montellese@xbmc.org> | 2012-10-08 18:20:52 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2012-10-08 18:20:52 +0200 |
commit | 33ea3861daec0db858752637050332b351c92d07 (patch) | |
tree | e5045d83298e9cda25d11e70286881d0c40a9d20 | |
parent | e5bbb0f5c8a05b33b35b698c9046a057c9af4e62 (diff) |
videodb: fix missing "where" in GetMusicVideoCount and GetRandomMusicVideo
-rw-r--r-- | xbmc/video/VideoDatabase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index aaad11adf5..5b86133b9b 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -6310,7 +6310,7 @@ int CVideoDatabase::GetMusicVideoCount(const CStdString& strWhere) if (NULL == m_pDS.get()) return 0; CStdString strSQL; - strSQL.Format("select count(1) as nummovies from musicvideoview %s",strWhere.c_str()); + strSQL.Format("select count(1) as nummovies from musicvideoview where %s",strWhere.c_str()); m_pDS->query( strSQL.c_str() ); int iResult = 0; @@ -7017,7 +7017,7 @@ 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 %s order by idMVideo limit 1 offset %i",strWhere.c_str(),iRandom); + strSQL.Format("select * from musicvideoview where %s order by idMVideo limit 1 offset %i",strWhere.c_str(),iRandom); CLog::Log(LOGDEBUG, "%s query = %s", __FUNCTION__, strSQL.c_str()); // run query if (!m_pDS->query(strSQL.c_str())) |