$instance;
}
Ken Vandegrift
-Original Message-
From: Martin Vidovic [mailto:[EMAIL PROTECTED]
Sent: Friday, April 14, 2006 10:58 AM
To: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Problems with Database Singleton Class
On Friday 14 of April 2006 17:51, Vandegrift, Ken wrote
On Friday 14 of April 2006 17:51, Vandegrift, Ken wrote:
> class WebDBConn {
>
> private static $instance = NULL;
>
> private function __construct() {
>
> self::$instance = new PDO($db, $user, $pwd);
> self::$instance->setAttribute(PDO::ATTR_ERRMODE,
> PDO::ERRMODE_EXCEPTION);
> }
>
>
Hello,
I am trying to create a singleton database class that wraps up the
creation of the PDO class. However, when I call the getInstance()
method and run it through the gettype() method (for testing purposes) it
returns 'object' but when I try to create a statement object I recieve a
Fatal erro