Actually interested in this library. I liked the fact that the work with the prepared expressions was more interesting. But faced with a question that I do not understand. In MySQL, to close a connection, you need to call close PDO itself, I did not find one. Moreover, it is recommended to make $Db = null; upon completion of the work $Db = null; . Well, apparently, the destructor will be called, but I would like to clarify, does it exactly close the socket of the connection to the database server, or did I miss something?
|
1 answer
judging by the documentation that way.
Upon receipt of the PDO, the class is returned to your script. PDO object . If you want to make it so, you can assign it. If your script ends.
In short, to close the connection you need to destroy the object.
|