Edmhar Posted November 2, 2013 Share Posted November 2, 2013 Hello. im gonna ask how i will make this happen.i have a mysql database ( StockItem, in, out, availableitem) add and subraction only assuming that I have value n my StockItem = 50 , in = 0 , out = 0 , availableitem = ( have a computation of stockitem - in & availableitem + out )so i will have form for ( in ) The IN AND OUT are USERINPUT it will have textbox that will input the value by admin.for example i input in FOR (in) textbox = 10 then click the button process it will update the whole table affecting all the field in that row Link to comment https://forums.phpfreaks.com/topic/283542-add-subtract-php-mysql-affecting-database/ Share on other sites More sharing options...
objnoob Posted November 3, 2013 Share Posted November 3, 2013 This can be done by creating a MySQL trigger. When you update, insert, and/or delete from a table, a trigger (you must create first) is fired to execute some code that updates, inserts, and/or deletes from another. http://dev.mysql.com/doc/refman/5.0/en/triggers.html Link to comment https://forums.phpfreaks.com/topic/283542-add-subtract-php-mysql-affecting-database/#findComment-1456655 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.