Database Abstraction with PEAR - DB::disconnect
(Page 4 of 7 )
This is, obviously, the function to use when disconnecting from a database. It is always good practice to use the disconnect function. In PHP, the end of a script should automagically do a disconnect, but I wouldn't rely on it. Use it just to be safe.
To use this function, we will reference the database object that was returned from an inital connect statement:
<?php $db = DB::connect($dsn, false); $db->disconnect(); ?> |
Next: DB::isError >>
More Database Articles Articles
More By Matt Wade