Hi,
ich krieg den nachfolgenden Fehler mit dem Newssystem wenn ich eine news erstellen wollte. Damit zerschießt es mir dann das WBB.
Code
Thu, 31 Mar 2016 13:47:54 +0000
Message: SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'sfdays_web.news.time' which is not in SELECT list; this is incompatible with DISTINCT
File: xxxxxxx/wcf/lib/system/database/Database.class.php (231)
PHP version: 7.0.4-1~dotdeb+8.1
WCF version: 2.1.10 (Typhoon)
Request URI: /news/news/1-eine-testnachricht/
Referrer: http:///news/news-add/
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Information: "<b>sql type:<\/b> wcf\\system\\database\\MySQLDatabase<br \/><b>sql error:<\/b> Expression #1 of ORDER BY clause is not in SELECT list, references column 'sfdays_web.news.time' which is not in SELECT list; this is incompatible with DISTINCT<br \/><b>sql error number:<\/b> HY000<br \/><b>sql version:<\/b> 5.7.11<br \/><b>sql query:<\/b> SELECT\tDISTINCT news.newsID AS objectID\r\t\t\tFROM\tnews1_news news\r\t\t\t\tLEFT JOIN news1_news_to_category category ON(news.newsID = category.newsID)\r\t\t\t\tWHERE category.categoryID IN(?,?,?,?) AND news.userID = ? AND news.newsID != ?\r\t\t\t\tORDER BY news.time DESC LIMIT 5<br \/>"
Stacktrace:
#0 xxxxxxx/news/lib/data/news/NewsList.class.php(46): wcf\system\database\Database->prepareStatement('SELECT\tDISTINCT...', 5, 0)
#1 xxxxxxx/news/lib/data/news/ViewableNewsList.class.php(89): news\data\news\NewsList->readObjectIDs()
#2 xxxxxxx/news/lib/page/NewsPage.class.php(179): news\data\news\ViewableNewsList->readObjects()
#3 xxxxxxx/wcf/lib/page/AbstractPage.class.php(273): news\page\NewsPage->readData()
#4 xxxxxxx/wcf/lib/page/AbstractPage.class.php(100): wcf\page\AbstractPage->show()
#5 xxxxxxx/wcf/lib/system/request/Request.class.php(58): wcf\page\AbstractPage->__run()
#6 xxxxxxx/wcf/lib/system/request/RequestHandler.class.php(139): wcf\system\request\Request->execute()
#7 xxxxxxx/news/index.php(3): wcf\system\request\RequestHandler->handle('news')
#8 {main}
Alles anzeigen