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.,



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire