require("connector/grid_connector.php");
require("connector/db_pdo.php");
$res=new PDO('mysql:hostocalhost;dbname=test', $user, $pass);
$gridConn = new GridConnector($res,"PDO");
require("connector/grid_connector.php");
require("connector/db_mysqli.php");
$mysqli = new mysqli($server, $user, $pass, $mysql_db);
$gridConn = new GridConnector($mysqli,"MySQLi");
require("connector/grid_connector.php");
require("connector/db_sqlite.php");
if (!$db = sqlite_open('db', 0777, $sqliteerror)) {
die($sqliteerror);
}
$gridConn = new GridConnector($db,"SQLite");
require("connector/grid_connector.php");
require("connector/db_postgre.php");
$res=pg_connect("hostocalhost port=5432 dbname=mary");
$gridConn = new GridConnector($res,"Postgre");
require("connector/grid_connector.php");
require("connector/db_oracle.php");
$res = oci_connect("scott", "tiger", $db);
$gridConn = new GridConnector($res,"Oracle");
require("connector/grid_connector.php");
require("connector/db_mssql.php");
$res=mssql_connect('.SQLEXPRESS',"sa","1",false);
mssql_select_db("sampleDB");
$gridConn = new GridConnector($res,"MsSQL");
require("connector/grid_connector.php");
require("connector/db_sqlsrv.php");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$gridConn = new GridConnector($conn,"SQLSrv");
require("connector/grid_connector.php");
$res=mysql_connect("localhost","root","");
mysql_select_db("myDatabase");
$gridConn = new GridConnector($res,"MySQL");
require("connector/grid_connector.php");
require("connector/db_pdo.php");
$gridConn = new GridConnector("/var/www/test","FileSystem");
$grid->render_table("./", "id", "A,B,C,D,E,F");
require("connector/grid_connector.php");
require("connector/db_excel.php");
$res=new PDO('mysql:hostocalhost;dbname=test', $user, $pass);
$grid = new GridConnector("some.xls", "ExcelDBDataWrapper");
$grid->render_table("A18:F83", "id", "A,B,C,D,E,F");
For other components the syntax of constructor is exactly the same, except that "Grid" in the object name is replaced with the component's name.
require("connector/grid_connector.php");
//...
$gridConn = new GridConnector($res,"MySQL");
require("connector/treegrid_connector.php");
//...
$treeGridConn = new TreeGridConnector($res,"MySQL");
require("connector/tree_connector.php");
//...
$treeConn = new TreeConnector($res,"MySQL");
require("connector/combo_connector.php");
//...
$comboConn = new ComboConnector($res,"MySQL");
require("connector/scheduler_connector.php");
//...
$schedulerConn = new SchedulerConnector($res,"MySQL");
require("connector/form_connector.php");
//...
$formConn = new FormConnector($res,"MySQL");
require("connector/dataview_connector.php");
//...
$dataConn = new DataViewConnector($res,"MySQL");
require("connector/chart_connector.php");
//...
$chartConn = new ChartConnector($res,"MySQL");
require_once("../../connector/data_connector.php");
require_once("../../connector/db_sqlite.php");
if (!$db = sqlite_open('db', 0777, $sqliteerror)) {
die($sqliteerror);
}
$storeConn = new JSONDataConnector($db,"SQLite");
Back to top