getTypeOfActivetyFromBusinessForm CHNAGED
This commit is contained in:
parent
1f8db2bcec
commit
9dc0d638e1
@ -2990,19 +2990,31 @@ class PD_Controller extends REST_Controller {
|
|||||||
$records = $this->post('records');
|
$records = $this->post('records');
|
||||||
$pdid = $records['pd_id'];
|
$pdid = $records['pd_id'];
|
||||||
|
|
||||||
$fields = array('column_name', 'column_value');
|
// $fields = array('column_name', 'column_value');
|
||||||
$where_condition_array = array('column_name'=>'type_of_activity','isactive'=>1,'fk_form_id'=>13,'fk_pd_id'=>$pdid);
|
// $where_condition_array = array('column_name'=>'type_of_activity','isactive'=>1,'fk_form_id'=>13,'fk_pd_id'=>$pdid);
|
||||||
$result_array = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILS);
|
// $or_where_total = array(array('column_name'=>'profession_name'));
|
||||||
|
// $result_array = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,PDFORMDETAILS,$or_where_total);
|
||||||
|
|
||||||
|
$this->db->SELECT('column_name,column_value');
|
||||||
|
$this->db->FROM(PDFORMDETAILS);
|
||||||
|
$this->db->WHERE('isactive',1);
|
||||||
|
$this->db->WHERE('fk_form_id',13);
|
||||||
|
$this->db->WHERE('fk_pd_id',$pdid);
|
||||||
|
$this->db->GROUP_START();
|
||||||
|
$this->db->OR_WHERE('column_name','type_of_activity');
|
||||||
|
$this->db->OR_WHERE('column_name','profession_name');
|
||||||
|
$this->db->GROUP_END();
|
||||||
|
$result_array = $this->db->GET()->result_array();
|
||||||
|
|
||||||
//print_r($this->db->last_query());
|
//print_r($this->db->last_query());
|
||||||
|
|
||||||
if(count($result_array))
|
if(count($result_array))
|
||||||
{
|
{
|
||||||
$fields = array('name');
|
$fields = array('name');
|
||||||
$where_condition_array = array('type_of_activity_id'=>$result_array[0]['column_value'],'isactive'=>1);
|
$where_condition_array = array('type_of_activity_id'=>$result_array[1]['column_value'],'isactive'=>1);
|
||||||
$result = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,TYPEOFACTIVITY);
|
$result = $this->PD_Model->selectCustomRecords($fields,$where_condition_array,TYPEOFACTIVITY);
|
||||||
|
|
||||||
if(count($result)){ $result_array[0]['name'] = $result[0]['name']; }
|
if(count($result)){ $result_array[1]['name'] = $result[0]['name']; }
|
||||||
|
|
||||||
|
|
||||||
$data['dataStatus'] = true;
|
$data['dataStatus'] = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user