Symfony Exception

PDOException InvalidQueryException

HTTP 500 Internal Server Error

Statement could not be executed (42000 - 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LEFT JOIN `categories` ON categories.categories_id=products_to_categories.cate' at line 1)

Exceptions 2

Zend\Db\Adapter\Exception\ InvalidQueryException

  1.             $this->resource->execute();
  2.         } catch (\PDOException $e) {
  3.             if ($this->profiler) {
  4.                 $this->profiler->profilerFinish();
  5.             }
  6.             throw new Exception\InvalidQueryException(
  7.                 'Statement could not be executed (' implode(' - '$this->resource->errorInfo()) . ')',
  8.                 null,
  9.                 $e
  10.             );
  11.         }
  1.         }
  2.         $select $this->getSelectCount();
  3.         $statement $this->sql->prepareStatementForSqlObject($select);
  4.         $result    $statement->execute();
  5.         $row       $result->current();
  6.         $this->rowCount = (int) $row[self::ROW_COUNT_COLUMN_NAME];
  7.         return $this->rowCount;
  1.      */
  2.     // @codingStandardsIgnoreStart
  3.     protected function _calculatePageCount()
  4.     {
  5.         // @codingStandardsIgnoreEnd
  6.         return (int) ceil($this->getAdapter()->count() / $this->getItemCountPerPage());
  7.     }
  8.     /**
  9.      * Creates the page collection.
  10.      *
in vendor/zendframework/zend-paginator/src/Paginator.php -> _calculatePageCount (line 558)
  1.     {
  2.         $this->itemCountPerPage = (int) $itemCountPerPage;
  3.         if ($this->itemCountPerPage 1) {
  4.             $this->itemCountPerPage $this->getTotalItemCount();
  5.         }
  6.         $this->pageCount        $this->_calculatePageCount();
  7.         $this->currentItems     null;
  8.         $this->currentItemCount null;
  9.         return $this;
  10.     }
Paginator->setItemCountPerPage() in src/Controller/ShoppingController.php (line 87)
  1.         //Erstellen der Artikelliste und Abruf der Seite
  2.         $res shopCollections::getProductsListByArray($_GET);
  3.         $paginator $res['products'];
  4.         $paginator->setItemCountPerPage($items);
  5.         $paginator->setCurrentPageNumber($page);
  6.         //Array mit Farben
  7.         $colors $res['colors']['main_colors'];
in vendor/symfony/http-kernel/HttpKernel.php -> show_category (line 158)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 25)
  1. }
  2. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  3. // $kernel = new Kernel('prod', false);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);
  8. function endsWith($haystack$needle)

PDOException

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LEFT JOIN `categories` ON categories.categories_id=products_to_categories.cate' at line 1

  1.         if ($this->profiler) {
  2.             $this->profiler->profilerStart($this);
  3.         }
  4.         try {
  5.             $this->resource->execute();
  6.         } catch (\PDOException $e) {
  7.             if ($this->profiler) {
  8.                 $this->profiler->profilerFinish();
  9.             }
  10.             throw new Exception\InvalidQueryException(
  1.         if ($this->profiler) {
  2.             $this->profiler->profilerStart($this);
  3.         }
  4.         try {
  5.             $this->resource->execute();
  6.         } catch (\PDOException $e) {
  7.             if ($this->profiler) {
  8.                 $this->profiler->profilerFinish();
  9.             }
  10.             throw new Exception\InvalidQueryException(
  1.         }
  2.         $select $this->getSelectCount();
  3.         $statement $this->sql->prepareStatementForSqlObject($select);
  4.         $result    $statement->execute();
  5.         $row       $result->current();
  6.         $this->rowCount = (int) $row[self::ROW_COUNT_COLUMN_NAME];
  7.         return $this->rowCount;
  1.      */
  2.     // @codingStandardsIgnoreStart
  3.     protected function _calculatePageCount()
  4.     {
  5.         // @codingStandardsIgnoreEnd
  6.         return (int) ceil($this->getAdapter()->count() / $this->getItemCountPerPage());
  7.     }
  8.     /**
  9.      * Creates the page collection.
  10.      *
in vendor/zendframework/zend-paginator/src/Paginator.php -> _calculatePageCount (line 558)
  1.     {
  2.         $this->itemCountPerPage = (int) $itemCountPerPage;
  3.         if ($this->itemCountPerPage 1) {
  4.             $this->itemCountPerPage $this->getTotalItemCount();
  5.         }
  6.         $this->pageCount        $this->_calculatePageCount();
  7.         $this->currentItems     null;
  8.         $this->currentItemCount null;
  9.         return $this;
  10.     }
Paginator->setItemCountPerPage() in src/Controller/ShoppingController.php (line 87)
  1.         //Erstellen der Artikelliste und Abruf der Seite
  2.         $res shopCollections::getProductsListByArray($_GET);
  3.         $paginator $res['products'];
  4.         $paginator->setItemCountPerPage($items);
  5.         $paginator->setCurrentPageNumber($page);
  6.         //Array mit Farben
  7.         $colors $res['colors']['main_colors'];
in vendor/symfony/http-kernel/HttpKernel.php -> show_category (line 158)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 25)
  1. }
  2. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  3. // $kernel = new Kernel('prod', false);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);
  8. function endsWith($haystack$needle)

Logs

No log messages

Stack Traces 2

[2/2] InvalidQueryException

Zend\Db\Adapter\Exception\InvalidQueryException:
Statement could not be executed (42000 - 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LEFT JOIN `categories` ON categories.categories_id=products_to_categories.cate' at line 1)

  at vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:244
  at Zend\Db\Adapter\Driver\Pdo\Statement->execute()
     (vendor/zendframework/zend-paginator/src/Adapter/DbSelect.php:123)
  at Zend\Paginator\Adapter\DbSelect->count()
     (vendor/zendframework/zend-paginator/src/Paginator.php:882)
  at Zend\Paginator\Paginator->_calculatePageCount()
     (vendor/zendframework/zend-paginator/src/Paginator.php:558)
  at Zend\Paginator\Paginator->setItemCountPerPage()
     (src/Controller/ShoppingController.php:87)
  at App\Controller\ShoppingController->show_category()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:25)                

[1/2] PDOException

PDOException:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LEFT JOIN `categories` ON categories.categories_id=products_to_categories.cate' at line 1

  at vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:239
  at PDOStatement->execute()
     (vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:239)
  at Zend\Db\Adapter\Driver\Pdo\Statement->execute()
     (vendor/zendframework/zend-paginator/src/Adapter/DbSelect.php:123)
  at Zend\Paginator\Adapter\DbSelect->count()
     (vendor/zendframework/zend-paginator/src/Paginator.php:882)
  at Zend\Paginator\Paginator->_calculatePageCount()
     (vendor/zendframework/zend-paginator/src/Paginator.php:558)
  at Zend\Paginator\Paginator->setItemCountPerPage()
     (src/Controller/ShoppingController.php:87)
  at App\Controller\ShoppingController->show_category()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:25)