How to update several rows of a codeigniter table

Asked

Viewed 186 times

0

Hello, I’m having the following problem, I have a stock table. follow img:

inserir a descrição da imagem aqui

these stock products are grouped every time I give an entry it adds to what already exists and creates a new line in the database.

inserir a descrição da imagem aqui

the point is I can’t do an update that would be the low stock taking products that have the same code line by line independent of quantity, the point is it’s not that it’s impossible, is that really I don’t even know where to start, can help me. I need an update to search the lines and check the amount to make the withdrawal of the total required and it is not possible to make a withdrawal greater than the amount of the lines that have the same product code summed.

THANK YOU!

  • Make a tour by stackoverflow, learn a little about the rules and good practices. Then edit your question and enter your code.

  • You are creating the table with CI_Table? Usa JQuery? Where is the model? the controller? to view?

  • Same code ? which code, specifies the column name. and what would be low ? delete the products ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.