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/Image_tb.php:49] DB\SQL->exec()
[app/handlers/AdminCarHandler.php:627] Image_tb->getCarImages()
[app/models/AdminCar.php:1259] AdminCarHandler->getCarImages()
[app/handlers/CarInfosHandler.php:427] AdminCar->formatDataForFront()
[app/controllers/MyImexso/CarInfosPdfController.php:6] CarInfosHandler->printInfos()
[lib/base.php:1806] CarInfosPdfController->printInfos()
[lib/base.php:1627] Base->call()
[index.php:453] Base->run()