G
G
ganjo8882019-06-07 09:45:59
Laravel
ganjo888, 2019-06-07 09:45:59

How to update every 2 record?

Help me write a query, there is a large number of records in the table, I need to go through all the records and update the field. But there are too many records and you need to break this query somehow. Help to make a cycle and the request itself

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andrei_pro, 2019-06-07
@andrei_pro

Model::chunk(function($models){...})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question