dimanche 17 mai 2020

SQLSTATE[42702]: Ambiguous column: 7 ERROR: column reference

DB::table('e_recruit.tr_candidate as a') ->leftjoin('e_recruit.tr_job_fptk as b','a.job_fptk_id','=','b.job_fptk_id') ->select(DB::raw('count(edu_university) as tot_university,edu_university')) ->whereYear('received_date',$year); $where = ['division'=>$division,'requester_name'=>$requester_name];

        if(!empty($division) && !empty($requester_name))   
        {
           $result =  $result->where($where);    
        }
        else if(!empty($where['division']))
        {   

            $result = $result->where('division',$division);    
        }
        elseif (!empty($where['requester_name'])) 
        {
            $result = $result->where('requester_name',$requester_name);
        }    

     return $result->whereNotNull('a.edu_university')
        ->where('process','HIRED')
        ->groupBy('a.edu_university')->get();  

}


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire