How to do an update on several rows of a table with codeigniter

0

Hello, I'm having the following problem, I have a stock table. follows img:

TheseinventoryproductsaregroupedeverytimeIgiveanentryitaddstowhatalreadyexistsandcreatesanewrowinthedatabase.

The issue is I can not do an update that would be the low of the stock removing the products that have the same code line by line regardless of quantity, the question is not that it is impossible, is that really I do not know nor where get started, can you help me. I need an update that scans the lines and check the quantity to make the withdrawal of the total required and that it is not possible to make a withdrawal that is greater than the quantity of the lines that have the same product code added.

THANK YOU!

    
asked by anonymous 29.11.2016 / 18:57

0 answers