Update database.php fixed multiple instances

Fixed the problem with using multiple database instances and reusing them. This bug caused the PDO::prepare() error.