Línea 77... |
Línea 77... |
77 |
}
|
77 |
}
|
78 |
public function fetchAllDataTableInnerJoinMember($search, $page = 1, $records_per_page = 10, $order_field= 'title', $order_direction = 'ASC', $user_id)
|
78 |
public function fetchAllDataTableInnerJoinMember($search, $page = 1, $records_per_page = 10, $order_field= 'title', $order_direction = 'ASC', $user_id)
|
79 |
{
|
79 |
{
|
80 |
$prototype = new HighPerformanceTeamsGroups();
|
80 |
$prototype = new HighPerformanceTeamsGroups();
|
81 |
$select = $this->sql->select();
|
81 |
$select = $this->sql->select();
|
82 |
$select->from(['gm' => HighPerformanceTeamsGroupsMembersMapper::_TABLE]);
|
82 |
$select->from(['g' => self::_TABLE]);
|
83 |
$select->join(['g' => self::_TABLE], ' g.id = gm.group_id', []);
|
83 |
$select->join(['gm' => HighPerformanceTeamsGroupsMembersMapper::_TABLE], 'gm.group_id = g.id', []);
|
84 |
$select->where->equalTo('gm.user_id', $user_id);
|
84 |
$select->where->equalTo('gm.user_id', $user_id);
|
85 |
$select->where->notEqualTo('gm.status', HighPerformanceTeamsGroupsMembers::STATUS_DELETE);
|
85 |
$select->where->notEqualTo('gm.status', HighPerformanceTeamsGroupsMembers::STATUS_DELETE);
|
86 |
|
86 |
|
87 |
if($search) {
|
87 |
if($search) {
|
88 |
$select->where->like('title', '%' . $search . '%');
|
88 |
$select->where->like('title', '%' . $search . '%');
|
89 |
}
|
89 |
}
|
90 |
$select->order($order_field . ' ' . $order_direction);
|
90 |
$select->order($order_field . ' ' . $order_direction);
|