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 Quote 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 Quote 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); Quote Link to comment https://forums.phpfreaks.com/topic/225717-mysqli__construct/#findComment-1165711 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.