DHTMLX Docs & Samples Explorer

Index
dhtmlxconnector

## API of connector Objects

#### render_table

configure connector to take data from single table

       $conn->render_table($table,$id,$text,$extra,$relation);

Parameters:

- $table - name of table;
- $id - name of id field ;
- $text - comma separated list of data fields;
- $extra - comma separated list of extra fields, optional;
- $relation_id - used for building hierarchy in case of Tree and TreeGrid.

#### render_sql

configure connector to take data based on provided SQL text

       $conn->render_sql($sql,$id,$text,$extra,$relation);

Parameters:

- $sql - any sql code, which will be used as a base for data selection;
- $id - name of id field;
- $text - comma separated list of data fields;
- $extra - comma separated list of extra fields, optional;
- $relation_id - used for building hierarchy in case of Tree and TreeGrid.

#### set_encoding

allows to set encoding, which will be used for generated XML (default encoding is UTF-8 )

        $conn->set_encoding("iso-8859-1");

Parameters:

- encoding name.

#### dynamic_loading

enable dynamical loading mode for connector

#### enable_log

enable logging for connector

#### is_select_mode

returns current active mode:

- true for data select mode;
- false for data update mode.

       if ($conn->is_select_mode()){
          do_something();
       }