I am developing a application that is in php and PostgreSQL.
What I want to know is which of these is best?
Please guide me the correct way to achieve my objective.
Connect at the start of your script, close it at ending. No need to re-connect on each query.