TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `TRHasilProduksiAdd` AFTER INSERT ON `tr_hasilproduksi_m` FOR EACH ROW BEGIN\n   Update tm_stockbrg set Stockakhir =  ifnull(stockakhir,0)+new.jmlproduksi\n   where kodebrg=new.kodeProduk;\nupdate tm_barang set hargaavg = New.Nilai/new.jmlProduksi where kodebrg=new.kodeProduk;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `TRHasilProduksiUpdate` AFTER UPDATE ON `tr_hasilproduksi_m` FOR EACH ROW BEGIN\n   Update tm_stockbrg set Stockakhir =  stockakhir-Old.jmlproduksi where kodebrg=Old.kodeProduk;\n   Update tm_stockbrg set Stockakhir =  stockakhir+new.jmlproduksi where kodebrg=new.kodeProduk;\nupdate tm_barang set hargaavg = New.Nilai/new.jmlProduksi where kodebrg=new.kodeProduk;\nend' 'CREATE DEFINER=`root`@`localhost` TRIGGER `TRHasilProduksiDelete` AFTER DELETE ON `tr_hasilproduksi_m` FOR EACH ROW BEGIN\n   Update tm_stockbrg set Stockakhir =  stockakhir-Old.jmlproduksi where kodebrg=Old.kodeProduk;\nend'
sql_modes=524288 524288 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
