500 Internal Server Error

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 (42000)

#0 /var/www/html/CM/Database/CSql.php(240): PDO->query()
#1 /var/www/html/sites/kuljettaja/libs/templates/slider-to-show-articles-by-tags.php(30): CM\Database\CSql->getValues()
#2 /var/www/html/global/functions/section-functions.php(165): include('...')
#3 /var/www/html/global/functions/section-functions.php(244): outputSection()
#4 /var/www/html/sites/kuljettaja/templates/article.php(2): outputSections()
#5 /var/www/html/CM/Template/View.php(84): include('...')
#6 /var/www/html/CM/Template/View.php(92): CM\Template\View->render()
#7 /var/www/html/CM/Engine.php(358): CM\Template\View->fetch()
#8 [internal function]: CM\Engine->_render()
#9 /var/www/html/CM/Core/Dispatcher.php(145): call_user_func_array()
#10 /var/www/html/CM/Core/Dispatcher.php(128): CM\Core\Dispatcher->invokeMethod()
#11 /var/www/html/CM/Core/Dispatcher.php(52): CM\Core\Dispatcher->execute()
#12 /var/www/html/CM/Engine.php(119): CM\Core\Dispatcher->run()
#13 /var/www/html/CM/CM.php(66): CM\Engine->__call()
#14 /var/www/html/sites/kuljettaja/controllers/ItemController.php(225): CM::__callStatic()
#15 /var/www/html/sites/kuljettaja/controllers/ItemController.php(189): ItemController->_renderTemplateItem()
#16 [internal function]: ItemController->viewTemplateItemForPermalink()
#17 /var/www/html/CM/Core/Dispatcher.php(148): call_user_func_array()
#18 /var/www/html/CM/Core/Dispatcher.php(128): CM\Core\Dispatcher->invokeMethod()
#19 /var/www/html/CM/Net/Router.php(114): CM\Core\Dispatcher->execute()
#20 /var/www/html/CM/Engine.php(315): CM\Net\Router->route()
#21 [internal function]: CM\Engine->_start()
#22 /var/www/html/CM/Core/Dispatcher.php(145): call_user_func_array()
#23 /var/www/html/CM/Core/Dispatcher.php(128): CM\Core\Dispatcher->invokeMethod()
#24 /var/www/html/CM/Core/Dispatcher.php(52): CM\Core\Dispatcher->execute()
#25 /var/www/html/CM/Engine.php(119): CM\Core\Dispatcher->run()
#26 /var/www/html/CM/CM.php(66): CM\Engine->__call()
#27 /var/www/html/sites/kuljettaja/index.php(10): CM::__callStatic()
#28 {main}