Do SQL connections opened with PDO in PHP have to be closed

后端 未结 6 1506
野的像风
野的像风 2020-11-28 07:36

When I open a MySQL connection in PHP with just PHP\'s built-in MySQL functions, I do the following:

$link = mysql_connect($servername, $username, $password)         


        
6条回答
  •  心在旅途
    2020-11-28 08:07

    You can also limit your connections to within local functions. That way the connection is closed as soon as the function is completed.

提交回复
热议问题