mercredi 28 mars 2018

query save and update with laravel

table pop

detail_pop

product_store

diagram sql

controller

when I add new data in pop table and pop detail, I want to: 1. when there is no store_id in the table store_product, then the data from the table pop.store_id and detail_pop.product_id, detail_pop.qty then it will go into table store_product with the sum in detail_pop.qty that will go into table store_product. 2. when there is store_id data in table store_product and product_id it will add data from pop.store_id, detail_pop.product_id and detail_pop.qty, by adding qty based on store_id and product_id, and if there is no same data in product_id in table store_product, it will add new data in table store_product ...

I use laravel, but I am still confused by the way data storage and how the calculation ...

I need help from experts

thank you



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

Aucun commentaire:

Enregistrer un commentaire