Class __construct
Posted: Tue Jun 05, 2007 11:36 am
feyd | Please use
WORKING
thanks to help me.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have a derived class that extend mysqli, and I'm trying to initialize mysqli in my derived construct.
no succes.
i've to instanciate the mysqli object to get the connection !!, WHY ?
NOT working.Code: Select all
class mySQL extends mySQLi
function __construct( $db ){
parent::__construct( "127.0.0.1", "login", "pwd", $db);
}
end class
$obj = new mySQL();Code: Select all
class mySQL extends mySQLi
public $_mySQLi;
function __construct( $db ){
$this->_mySQLi= new mysqli("127.0.0.1", "login", "pwd", $db);
}
end class
$obj = new mySQL();feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]