jeudi 19 mai 2016

subquery with update laravel

I write simple query in mysql

 update cart set cart_price=(select sum(total_price) from cart_items where cart_id=9) where cart_id=9

I want to implement the same thing using Laravel elequent. How can I do that ?

Thanks.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1qvIIf3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire