lundi 7 novembre 2016

Updating my table with save () with Eloquent/Laravel 5.3 is updating all rows instead of one

Weird problem. I am trying to update one row using eloquent Model/Laravel 5.3 instead of updating one row it is updating the column I want to update but in every row in the table. I am sure I am just missing something but I can't just look at it anymore. Any help would be appreciated...

$userUpdate = userTable::placeid($placeId)->userid($userId)->regid($regId)-key($key)->first();

That gets me one row as a result.

then...

$userUpdate->VALUE = $value;

$userUpdate->save();

These three lines update the VALUE column in the table but every single row and not just the one I pulled.

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire