Hi you all,
I have been using custom triggers becuase they are very handy. I however need to do a query that does an select and based on result do a loop and process some update or inserts. Well my problem is that i dont know of a native way to fetch result in a custom trigger. I have always been doing something like this for my updates for example:
$update_prices = "update cart_details set price = '$cost' where cart_details_id='$cart_details_id' ";
$result2 = $tNG->connection->execute($update_prices);
However when it come to getting the results of a select I am lost.I wish there was a manual or some kind of documentation for this framework. Any ideas ???
I have discoved the apis to fix my problem. Its amazing that the solution was not posted on this fourm before. Seems like though this is a old framework it is not used by hard core coders who need more that what is offered by the addt gui. Through my own digging i was able to find a solution:
$result2 = $tNG->connection->execute("select idprd_pdt from fbs_product_pdt where idmnu_pdt = '".$result->Fields("idmnu_pdt")."' ");
$update = "update fbs_proddet_prd set image_prd = '$image_prd', make_default_image_for_this_category = 'Y'
where id_prd = '".$result2->Fields("idprd_pdt")."' ";
$result_update = $tNG->connection->execute($update);
$values .= $result2->Fields("idprd_pdt").",";
to find the classes and their function you can navigate to includes/common/lib/db/KT_Recordset.class.php