Level 6
DB::table('attendence')
->where('name',$name)
->whereNull('type')
->update([ 'checkedout' => $this->data->checkedout, 'type'=> $this->data->type, ]);
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want a query with two conditions to update but it should be an and conditions. my code is below. it does not work.
DB::table('attendence') ->where([['name',$name] ,['type',null] ]) ->update([ 'checkedout' => $this->data->checkedout, 'type'=> $this->data->type, ]);
DB::table('attendence')
->where('name',$name)
->whereNull('type')
->update([ 'checkedout' => $this->data->checkedout, 'type'=> $this->data->type, ]);
Please or to participate in this conversation.