I have this EMPLOYEE table of employees list
+-----+---------------+-------------+
| ID |EMPLOYEE_ID | SKILLS |
+-----+---------------+-------------+
|
You can try this over join
DB::table('POSTED_JOB')->leftJoin('EMPLOYEE', function($join){
$join->on(DB::raw("find_in_set(POSTED_JOB.JOB_SKILLSmEMPLOYEE.SKILLS)"));
});
You can try this to search in two columns.
SELECT * FROM order1 WHERE FIND_IN_SET(order_no,'$foo') OR awb_no IN ('$foo')
$skills = 'select the employee skills';
$skl_arr = explode(',',$skills);
$skl_length = count($skl_arr);
/*query */
$rows->orwhere(DB::raw("find_in_set('$skl_arr[0]','post_job.skills')"));
for ($i=1; $i < $skl_length ; $i++) {
$rows->$join->on(DB::raw("find_in_set('$skl_arr[$i]','post_job.skills')",DB::raw(''),DB::raw('')));
}