arduino connection with mysql database

Salve, sto facendo un progetto per la maturità, ho già cercato più volte un aiuto per il mio progetto ma ci sono solo suggerimenti contrastanti.Ho bisogno di un codice di un programma che messo in arduino si colleghi ad un mio database scritto in mysql utilizzando xampp. Come hardware ho un arduino mega e un wifi esp8266.
Quindi ricapitolando mi serve un codice con cui posso fare delle query da eseguire per il mio database.
Grazie in anticipo per l'aiuto

Hi, I'm doing a project for high school, I have already tried several times for help for my project but there are only conflicting suggestions. I need a code of a program that put in Arduino connects to my database written in mysql using xampp. As hardware I have an arduino mega and an esp8266 wifi.
So in summary I need a code with which I can make queries to be executed for my database.
Thanks in advance for the help