[ic] Delete SQL within query tag returns ??

Tim Good draco at edsd.com
Thu May 13 10:56:18 EDT 2004


Hello list,

I am working on developing a Usertag to remove an item
from an existing order. The tag will then update the 
totals for the order. My question is when using delete
sql within the query tag what is returned?

My usertag would look something like ... (depending on what is
returned):

UserTag delitem Order curo
UserTag delitem PosNumber 2
UserTag delitem addAttr
UserTag delitem Routine <<EOR
sub {
        my ($curo,$delitem) = @_;
    
        my ($sql, $results, $itemprice, $iteminstall, $totcst);

        $sql = "delete from orderline where order_number = $curo and sku
= $delitem";
        $results = $Tag->query({ table=>'orderline', sql=>$sql });
                .
                .
               error checking
                .
                .
         
        $itemsub = $results->[0]->[10];
        $iteminstall = $results->[0]->[24];
        $totcst -= $itemsub + iteminstall;
        $sql = "update tranactions set total_cost = $totcst where
order_number = $curo";
        $results = $Tag->query({ table=>'transactions', sql=>$sql });

                .
                .
               error checking
                .
                .

        return ... error or no error ...;
}
EOR

(mysql 3.23.58 on Redhat 8.0 non threaded perl 5.8.2 interchange 5.2
stable)

All help is greatly appreciated,

Tim




More information about the interchange-users mailing list