2
I’m starting with the SQL
of Laravel
I searched much more I did not get an answer on how to make a AND
after a where
, follows example code to implement a AND
.
SQL:
UPDATE contas
SET valor_titulo = 0,
WHERE id_contrato = 2
AND data_vencimento = '2017-05-05'
Like I’m doing in the Laravel:
DB::table('contas')
->where('id_contrato', $options['id_contrato'])
->update(['valor_titulo' => $attributes['valor_titulo']);
How to put a AND
in this structure?
Virgilio Novic tried with the second option and worked perfectly, thanks for the help.
– Leonardo Max