0
DB::connection('gtsql')->beginTransaction();
$seriefat = DB::connection('gtsql')->table('se_seriefat')
->where('c_codserie', 'FO')->first();
echo $seriefat->c_numultdoc;
sleep(15);
DB::connection('gtsql')->commit();
If Run in this 15-second time an update to this table record se_seriefat... it works normal should not return me a lock error?
I am using SQLSRV
In that code there is no
update
!!!– novic
So, but it only works if I give it a $seriefat->save() ? Sure it wouldn’t stay in lock, locked the record until I give commit() ?
– Lucas Moura
idea if this doesn’t work.. $seriefat = SerieFat::where('c_codserie','FO')->first();


 $seriefat->c_numultdoc = $seriefat->c_numultdoc + 1;
 if ($seriefat->save()) {
 echo 'Atualizaou';
 } else {
 echo 'Não Atualizou';
 }
– Lucas Moura