Pierre Bouillon Nov 9 '17
I'm building a website and I have several SQL requests in several files.
My question is should I :
- make a "global" PDO in a file and include the file to use it every time I need to do a request (but when close the connection?)
- create a PDO before each request and then close the connection
What will be the best practice and why?
Thanks and happy coding !