Internal Server Error

PDOStatement: 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 'order by cars_images.ordering' at line 1

[lib/base.php:2190] Base->error()
[lib/db/sql.php:235] user_error()
[app/models/CarsImages.php:12] DB\SQL->exec()
[app/handlers/CarInfosHandler.php:90] CarsImages->getCarImagesById()
[app/controllers/MyImexso/CarInfosController.php:6] CarInfosHandler->defaultAction()
[lib/base.php:1806] CarInfosController->index()
[lib/base.php:1627] Base->call()
[index.php:12] Base->run()