Julian wrote: > > but that forces me to implement a large interface of functions that I > prefer to avoid... > > the $dummy thing works... but I guess it is not "by the book". > > I would like to understand what am I missing fom the concept.... You made a critial error in the original implem. You effectively write dbaccess::$db twice. Your $dummy gets around this. See my previous post, but the real issue is this code flow: In GetDb() you do: dbaccess::$db= new dbaccess(); So firstly PHP creates calls the constructor. In the constructor of dbaccess you do: dbaccess::$db = new mysqli(...); So PHP will assign the mysqli object to the variable you want. PHP will then return from the contructor of dbaccess returning the dbaccess object itself, which is then assigned to dbaccess::$db, overwriting the mysqli object. Hope that explains why what you did was a bit wrong and that one of the solutions I proposed is what you want. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php