The init code are similar for all components and DB types
MySQL
require("connector/grid_connector.php"); $res=mysql_connect("localhost","root",""); mysql_select_db("myDatabase"); $gridConn = new GridConnector($res,"MySQL");
PostgreSQL
require("connector/grid_connector.php"); require("connector/db_postgre.php"); $res = pg_connect("host=localhost port=5432 dbname=mary"); $gridConn = new GridConnector($res,"Postgre");
Oracle
require("connector/grid_connector.php"); require("connector/db_oracle.php"); $res = oci_connect("scott", "tiger", $db); $gridConn = new GridConnector($res,"Oracle");
MSSQL
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");
PDO ( MySQL, PostgreSQL, Oracle, MSSQL, DB2, SQLlite)
require("connector/grid_connector.php"); require("connector/db_pdo.php"); $res = new PDO('mysql:host=localhost;dbname=test', $user, $pass); $gridConn = new GridConnector($res,"PDO");
For other components syntax of constructor exactly the same, except, the “Grid” in object name replaced with component's name
Grid
require("connector/grid_connector.php"); //... $gridConn = new GridConnector($res,"MySQL");
TreeGrid 1)
require("connector/treegrid_connector.php"); //... $treeGridConn = new TreeGridConnector($res,"MySQL");
Tree 2)
require("connector/tree_connector.php"); //... $treeConn = new TreeConnector($res,"MySQL");
Combo
require("connector/combo_connector.php"); //... $comboConn = new ComboConnector($res,"MySQL");
Scheduler
require("connector/scheduler_connector.php"); //... schedulerConn = new SchedulerConnector($res,"MySQL");