php - Try & catch pdo close database connection -
try{ //pdo connect db, $db }catch(pdoexception $e){die("error"));}
i have query user pdo connect database.
i use try & catch, question if query error
do need close conncetion before die();
?
}catch(pdoexception $e){$db="null"; die("error"));}
no, not necessary in php. when php process finished, connection closed too.
Comments
Post a Comment