Try & catch pdo close database connection

前端 未结 2 519
遇见更好的自我
遇见更好的自我 2021-02-06 19:50
try{
    //PDO CONNECT DB, $db

}catch(PDOException $e){die(\"ERROR\"));}

I have a query user PDO connect to database.

I use try & catch, m

2条回答
  •  无人共我
    2021-02-06 20:33

    No, it is not necessary in php. When your php process finished, the connection will be closed too.

提交回复
热议问题