From 33ea3861daec0db858752637050332b351c92d07 Mon Sep 17 00:00:00 2001 From: montellese Date: Mon, 8 Oct 2012 18:20:52 +0200 Subject: videodb: fix missing "where" in GetMusicVideoCount and GetRandomMusicVideo --- xbmc/video/VideoDatabase.cpp | 4 ++-- 1 file 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())) -- cgit v1.2.3