Dear All,
My PHPMaker version is 2020 and I have problem with my Row_Inserted function. I have 3 table ;
Table1
id(int) auto increment, choice(varchar), description(varchar), summary(varchar)
Table2
id(int) auto increment, description(varchar)
Table3
id(int) auto increment, summmary(varchar)
This is my Row_Inserted function on Table1:
function Row_Inserted($rsold, &$rsnew) {
$pilihan = $rsnew["choice"];
if ($pilihan = "A") {
Execute("INSERT INTO Table2 (description) VALUES('" . $rsnew["description"] . "')");
} else {
Execute("INSERT INTO Table3 (summary) VALUES('" . $rsnew["summary"] . "')");
}
}
My problem is, only INSERT INTO Table2 fired, whatever my choice field's value, I cannot insert to Table3 when my "choice" value not "A"
Anybody can help? Thanks for your kindness