hi
how to row wise calculate can you solve this
mysql only
id product rept payt
'1', 'Mouse', '1000.00', '0.00'
'2', 'Key', '2500.00', '1200.00'
'3', 'Lap', '8500.00', '300.00'
'4', 'CD', '900.00', '0.00'
INSERT INTO `test`.`tblp` (`id`, `product`, `rept`, `payt`) VALUES (1, 'Mouse', '1000', '0');
INSERT INTO `test`.`tblp` (`id`, `product`, `rept`, `payt`) VALUES (2, 'Key', '2500', '1200');
INSERT INTO `test`.`tblp` (`id`, `product`, `rept`, `payt`) VALUES (3, 'Lap', '8500', '300');
INSERT INTO `test`.`tblp` (`id`, `product`, `rept`, `payt`) VALUES (4, 'CD', '900', '0');
my ouput like this
id product rept payt bal
'1', 'Mouse', '1000.00', '0.00' 1000
'2', 'Key', '2500.00', '1200.00' 2300
'3', 'Lap', '8500.00', '300.00' 10500
'4', 'CD', '900.00', '0.00' 11400
Mark as Answer if its helpful to you
Kumaraspcode2009@gmail.com