2
I wonder if there is how to create only a connection to the database to perform the tasks. With each Action executed, a connection with the Database is created and at the end of the Action execution, the connection is closed. Then, when it is necessary to execute an Action within another, two connections are opened in addition to the one that was opened for the first query to the database, thus creating several connection clones.
I wonder if there’s any function that can solve this and how to use it. If you need some code to give a better understanding of what I need I put it here.
Are you using any framework?
– André Ribeiro
Use the Yii framework. And the database is Postgresql
– Thuanny Martins