Commit 510e2a36 by Jansa Jose

get mechanics add review

parent c000a428
......@@ -453,6 +453,16 @@ class Webservice_model extends CI_Model {
if(empty($mechData) || empty($mechData = $mechData->result_array())){
return 0;
}
foreach ($mechData as $key => $value) {
$mechData[$key]['distance'] = (float)$value['distance'];
$this->db->order_by('id','DESC');
$this->db->limit('2','0');
$mechRvw = $this->db->get_where('mechanic_rating',array('mechanic_id'=>$value['mechanic_id'],'status'=>'1'));
if(!empty($mechRvw) && !empty($mechRvw = $mechRvw->result_array())){
$mechData[$key]['review'] = $mechRvw;
}
}
if($type == 0){
$respArr = $this->getNearMechanicsDetails($mechData,$issue_cat_id);
if($respArr['status'] == 'success'){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment