codingmasterRS Posted January 26, 2011 Share Posted January 26, 2011 This line of PHP mysqli::__construct($CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname); returns Fatal error: Non-static method mysqli::mysqli() cannot be called statically in Why does it do this? I want to use the OOP MySQLi methods in PHP and NO procedural PHP Link to comment https://forums.phpfreaks.com/topic/225717-mysqli__construct/ Share on other sites More sharing options...
codingmasterRS Posted January 26, 2011 Author Share Posted January 26, 2011 BUMP Link to comment https://forums.phpfreaks.com/topic/225717-mysqli__construct/#findComment-1165708 Share on other sites More sharing options...
Alex Posted January 26, 2011 Share Posted January 26, 2011 The error is pretty self-explanatory. You can't call that method statically, you need to change an instance of the MySQLi object. $mysql = new MySQLi($CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname); Link to comment https://forums.phpfreaks.com/topic/225717-mysqli__construct/#findComment-1165711 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.