68
2017-07-21 20:52:09
0
이것이 관계있는지 모르지만...
"To close the connection, you have to set both the PDO object AND the PDOStatement object to null" 이란 말이 있네요.
Pgsql의 예제라고 합니다.
<?php
$pdo = new PDO('pgsql:host=192.168.137.160;port=5432;dbname=platin', 'cappytoi', '1111');
sleep(5);
$stmt = $pdo->prepare('SELECT * FROM admin');
$stmt->execute();
$stmt->closeCursor(); // this is not even required
$stmt = null; // doing this is mandatory for connection to get closed
$pdo = null;
sleep(60);
?>