Database Session Mysql Open and Close

Hi folks
I would like to know how the opening, connection and closing of the databases works, can each page have a special session?
I ask this because I need to open a connection to Mysql inside a customview for this I need to know if the database is already open and if it remains all the time until the application is closed. Thank you very much

Hi, the database connection is only open when a query is executed by the app and the connection is closed after that. Having a special session is up to you, you can create a session field to store specific data for a page, and you canā€™t have duplicate session names. A session is a way for a web application to identify a specific logged-in client/user interacting with it, at a specific time.

1 Like

Great Willvin, As always an accurate answer. I was browsing for that side, I read that in PHP when you set the session variable to Null it closes after the query.
Thank you very much