Si tu programme pas en thread, ou si tu n'appele rien après ton connect, sa sert a rien.
Il faut savoir que ce que tu fait dans un bloc reste dans le bloc. En gros, ton connect te connect a ta bdd, mais si tu fait rien après, il sort et tu ne peut plus utiliser la connexion.
Il faudrait que ta fonction connect te renvoie quelque chose pour utiliser la connection, par exemple un objet qui te permettrait de faire des requetes
What's tiny, and yellow and very very dangerous?????
A canary with the super-user password.
Mouhahahaha