title: How join two table or writing custom queries in Datatable php?
body: <p>I am using datatable to list data as server side scripting.</p>
  
  <pre><code>    // DB table to use
  $table = 'enquiry';
  
  // Table's primary key
  $primaryKey = 'enquiry_id';
  
  // Array of database columns which should be read and sent back to DataTables.
  // The `db` parameter represents the column name in the database, while the `dt`
  // parameter represents the DataTables column identifier. In this case simple
  // indexes
  $columns = array(
      array(
          'db' =&gt; 'enquiry_date',
          'dt' =&gt; 0,
          'formatter' =&gt; function( $d, $row ) {
              return date('jS M y', strtotime($d));
          }
      ),
      array('db' =&gt; 'parent_name', 'dt' =&gt; 1),
      array('db' =&gt; 'child_name', 'dt' =&gt; 2),
      array('db' =&gt; 'mobile', 'dt' =&gt; 3),
      array('db' =&gt; 'emirate', 'dt' =&gt; 4),
      array('db' =&gt; 'remarks', 'dt' =&gt; 5),
      array('db' =&gt; 'enquiry_status_id', 'dt' =&gt; 6),
  );
  
  // SQL server connection information
  $sql_details = array(
      'user' =&gt; 'root',
      'pass' =&gt; '',
      'db' =&gt; 'lsn',
      'host' =&gt; ''
  );
  
  
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   * If you just want to use the basic configuration for DataTables with PHP
   * server-side, there is no need to edit below this line.
   */
  
  require( './server_side/scripts/ssp.class.php' );
  
  echo json_encode(
          SSP::simple($_GET, $sql_details, $table, $primaryKey, $columns)
  );
  </code></pre>
  
  <p>This is my php server side scripting and working very fine for single table. </p>
  
  <p>I want to join two table while listing table row. But I couldn't find any option for joining tables or writing custom queries. </p>
  
  <p>how can I join table if it is possible? </p>