DHTMLX Docs & Samples Explorer

JSONDataConnector/DataConnector

For all components of DHTMLX Touch you can use the next two connectors:

  • JSONDataConnector
  • DataConnector

They both work the same way, but differ in type of returned data. The first one generates 'xml' data feed, the second one - 'json' data feed.

<?php 
require_once("../../connector/data_connector.php");
require_once("../../connector/db_sqlite.php");
 
if (!$db = sqlite_open('db', 0777, $sqliteerror)) {
	die($sqliteerror);
}
$data = new JSONDataConnector($db,"SQLite");
$data->render_table("users", "id", "name,age,city");
?>