DHTLMX Touch connecting with Mysql

Does anyone have any examples of how to connect the components with mysql?

I’m not getting.

With the examples of the site did not work. But I do not know what to do.

Thanks.

Does anyone have any examples of how to connect the components with mysql?

$connector_path = “…/connectors/”;
require_once($connector_path.“data_connector.php”);

$res = mysql_connect(…);
mysql_select_db(…);

$data = new JSONDataConnector($res);

With the examples of the site did not work. But I do not know what to do.

Check that connection to db is set. If it is correct, you may check that connector is configured correctly - use enable_log method

$data = new JSONDataConnector($res);
$data ->enable_log(“temp.log”);
$data->render_table(“dist_pedido_itens”, “id”, “count”);

temp.log will contain log with connector actions and errors.

Thanks for your help. Now it worked.

connector_path $ = “connectors /”;
require_once ($ connector_path. “data_connector.php”);

$res = mysql_connect (“localhost”, “root”, “test”);
mysql_select_db (“SampleDB”);

$data = new JSONDataConnector ($res);

$data->enable_log ("/ camninho / temp.log");
$data->render_table (“test”, “id”, “count, idproduto”);

I’m very happy… Thanks… :smiley: :laughing: :stuck_out_tongue: