Connecting to MySQLi

Hello support,

i’m trying to use a connector with MySQLi (PHP).
But I get the following error message:

[code]Warning: mysqli::mysqli() expects parameter 1 to be string, object given in [PATH_TO_CONNECTOR]/base_connector.php on line 308

Fatal error: Call to undefined method mysqli::select() in [PATH_TO_CONNECTOR]/base_connector.php on line 422[/code]

Maybe you can’t reproduce it, since I added some comments to the code to understand some things better.

The critical line that produces the warning is:

$this->sql = new $this->names["db_class"]($db,$this->config);

This is my init:

$gridConnector = new GridConnector([MySQLi-Object], "MySQLi");

Maybe the connection handle (I use the returned value from MySQLi-Object init in PHP) is supposed to be something different… ?

Please check if you have included db_mysqli.php file. Also check if you are using latest version of dhtmlxConnectors.

Warning: mysqli::mysqli() expects parameter 1 to be string, object given in
Syntax of mysqli extension is different for different php version
Most probably your problem will be resolved by updated to latest stable php version.

Sorry for the late response. I remember having fixed the problem. The good thing about the dhtmlx-stuff is, that it is easily reproducable and extendable. :wink:

So, thanks for your help.