Mysql
 sql >> Datenbank >  >> RDS >> Mysql

FIND_IN_SET mit zwei Strings

$skills = 'select the employee skills';
$skl_arr = explode(',',$skills);
$skl_length = count($skl_arr); 

/*Abfrage */

$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('')));

}