TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `AfterInsert` AFTER INSERT ON `tm_barang` FOR EACH ROW BEGIN\nDeclare vtemp double;\nDeclare vtemp2 double;\n  select count(*) into vtemp from tb_saldoawal where kodebrg=new.kodebrg and kodeGd= "GD1";\n  if vtemp = 0 then\n     insert into tb_saldoawal (KodeBrg,NamaBrg,KodeGol,KodeGD,Satuan,Konv,SaldoAwal,HargaAvg) values (new.KodeBrg,new.NamaBrg,new.KodeGol,"GD1",new.satuan,1,0,new.HargaAvg);\n  end if;\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER `BeforeEdit` BEFORE UPDATE ON `tm_barang` FOR EACH ROW BEGIN\nEND'
sql_modes=524288 524288
definers='root@localhost' 'root@localhost'
