Exception information:

           Date: Sep 21, 2017 5:32AM

           Message: 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 'AND deal_categories.rgt <=' at line 1

           Code: 42000

           File: /var/www/html/shop/system/Helpers/Database.php

           Line: 102

           Stack trace:

           #0 /var/www/html/shop/system/Helpers/Database.php(102): PDOStatement->execute()
#1 /var/www/html/shop/app/Modules/Admin/Models/AddDeal/AddDeal.php(643): Helpers\Database->select('SELECT GROUP_CO...', Array)
#2 /var/www/html/shop/app/Modules/Deals/Controllers/Deals.php(1048): App\Modules\Admin\Models\AddDeal\AddDeal->getCatChildren(Array)
#3 [internal function]: App\Modules\Deals\Controllers\Deals->main_categoryList('kids-and-toys')
#4 /var/www/html/shop/system/Core/Controller.php(137): call_user_func_array(Array, Array)
#5 /var/www/html/shop/system/Routing/BaseRouter.php(203): Core\Controller->execute('main_categoryLi...', Array)
#6 /var/www/html/shop/system/Routing/BaseRouter.php(234): Routing\BaseRouter->invokeController('App\\Modules\\Dea...', 'main_categoryLi...', Array)
#7 /var/www/html/shop/system/Routing/Router.php(269): Routing\BaseRouter->invokeObject('App\\Modules\\Dea...', Array)
#8 /var/www/html/shop/system/bootstrap.php(74): Routing\Router->dispatch()
#9 /var/www/html/shop/index.php(78): require('/var/www/html/s...')
#10 {main}

           ---------