mardi 27 août 2019

Update Table without loops

There is a table foo and it has a column called fooPos. I ned to update the fooPos column with respect to id.

I have the following data

$id = [21,23,34,56,76];
$fooPos = [1,2,3,4,5];

How can I update this without using loops? It's like 21(id) => 1(fooBar), 23 => 2, 34 =>3 etc.,



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NzLZcY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire