I have a table user with below fields .
id user_name team onsite_offshore
1 xxx US East offshore
2 YYY US East onsite
3 zzz US East onsite
4 aaa Us West onsite
5 bbb US West offshore
I have two dependency dropdown geo and location with geo values 'US East' and 'US West' and location value 'US East and premisis' for'US East'
'US West and premisis' for 'US West dropdown'.
geo Location
US East - US East,offshore(display as 2 options one by one) US West - US West and offshore(display as 2 options one by one)
on choosing US East in localtion with geo 'US East' dropdow I want to load the value 'yyy,zzz' which is not inluded in offshore(which is in same table with different column.)
on choosing offshore in localtion dropdown for geo 'US EASt'I want to load the value 'XXX' which is should inluded in offshore(which is in same table with different column.)
on choosing US West in localtion with geo 'US West' dropdown I want to load the value 'aaa' which is not inluded in offshore(which is in same table with different column.)
on choosing offshore in localtion dropdown for geo 'US West' I want to load the value 'bbb' which is should inluded in offshore(which is in same table with different column.)
$filter_team_details=DB::table('user_master')->leftjoin('user_teams','user_teams.team','=','user_master.geo')->whereIn('user_teams.team',$teams)->groupBy('user_teams.team')->pluck('user_teams.team')->toArray(); (In this query I want to check for onsite_offshore condition in same query )
Is it possible to check both condition single table as
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire