mouzak

table reading

Posted 1 week ago by mouzak

Hi! I have a problem to properly query my table which is in my database. I want to recover either column 1 or column 1.5 or column 2 etc. according to a variable. for example if $im=1 i recover the colum 1. if $im=2 i recover the colum 2 ....

$im=salaries::selectRaw('(nombreparts) as total')->where('salaries.id', $request->id)->first()->total; $d=salaries::selectRaw('(salairebase + sursalaire) as total')->where('salaries.id', $request->id)->first()->total; $data['impot']= DB::table('baremes') ->where('RB','=',$d) ->where(????) I do not know how to do this second condition

RB Trimf 1 1,5 2 2,5 3 3,5 4 4,5 50000 300 10 40 10 80 60 10 90 30 51000 300 40 30 20 50 90 20 50 60 52000 300 90 90 30 40 40 50 07 90 53000 300 70 70 70 70 30 90 80 20

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.