Composite Create Method

The composite_create method purpose is for generating key pair array for a parameter value in join_composite method.

Basic Usage

Here is the basic usage composite_create method from $db property on SENE_Model class.

$this->db->composite_create(string $TBL1_COLUMN_1, string $OPERATOR, string $TBL2_COLUMN_1): compositeObject;


composite_create method has 3 required parameters and will returned join composite object


Column name for first table.


Can contain a relational operator, such as:

  • =
  • <>


Column name for second table.

This method available from Seme Framework version >= 3.2.1


Here is the example usage for using composite_create method.

class D_Sales_Model extends SENE_Model{
  var $tbl = 'd_sales';
  var $tbl_as = 'dsl';
  var $tbl2 = 'b_seller';
  var $tbl2_as = 'bs';

  public function __construct(){
  private function __joinTbl2(){
    $composites = array();
    $composites[] = $this->db->composite_create("$this->tbl_as.nation_code","=","$this->tbl_as.nation_code");
    $composites[] = $this->db->composite_create("$this->tbl_as.b_seller_id","=","$this->");
    return $composites;
  public function getByOrderId($id){
    return $this->db->get_first();