Commit 659707f1 authored by LucBUTGH's avatar LucBUTGH
Browse files

fix: table names

parent 9708e3e1
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -20,20 +20,20 @@ public function index(): View
        }
        

        $dateDivesBefore = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id')
        ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code')
        ->join('car_diving_location','car_diving_session.DL_ID','=','car_diving_location.DL_ID')
        ->where('car_user.US_ID',$userId)
        $dateDivesBefore = DivingNumberModel::join('CAR_REGISTRATION', 'CAR_USER.us_id', '=', 'CAR_REGISTRATION.us_id')
        ->join('CAR_DIVING_SESSION','CAR_REGISTRATION.ds_code','=','CAR_DIVING_SESSION.ds_code')
        ->join('CAR_DIVING_LOCATION','CAR_DIVING_SESSION.DL_ID','=','CAR_DIVING_LOCATION.DL_ID')
        ->where('CAR_USER.US_ID',$userId)
        ->where('CAR_DIVING_SESSION.DS_DATE','<',now())
        ->get();

        $dateDivesAfter = DivingNumberModel::join('car_registration', 'car_user.us_id', '=', 'car_registration.us_id')
        ->join('car_diving_session','car_registration.ds_code','=','car_diving_session.ds_code')
        ->join('car_diving_location','car_diving_session.dl_id','=','car_diving_location.dl_id')
        ->join('car_role_attribution','car_user.us_id','=','car_role_attribution.Us_id')
        ->join('car_role','car_role_attribution.rol_code','=','car_role.rol_code')
        $dateDivesAfter = DivingNumberModel::join('CAR_REGISTRATION', 'CAR_USER.us_id', '=', 'CAR_REGISTRATION.us_id')
        ->join('CAR_DIVING_SESSION','CAR_REGISTRATION.ds_code','=','car_diving_session.ds_code')
        ->join('CAR_DIVING_LOCATION','CAR_DIVING_SESSION.dl_id','=','car_diving_location.dl_id')
        ->join('CAR_ROLE_ATTRIBUTION','CAR_USER.us_id','=','CAR_ROLE_ATTRIBUTION.Us_id')
        ->join('CAR_ROLE','CAR_ROLE_ATTRIBUTION.rol_code','=','CAR_ROLE.rol_code')
        ->where('CAR_DIVING_SESSION.DS_DATE','>=',now())
        ->where('car_user.US_ID',$userId)
        ->where('CAR_USER.US_ID',$userId)
        ->get();