remove duplicate payments

1317427200 and comment like '%PayPal transaction ID%'"); $payments = array(); $delete = array(); while ($row=db_fetch_object($result)) { if (in_array($row->comment,$payments)) { echo 'should delete '.$row->receipt_id.'
'; $delete[] = $row->receipt_id; } else { $payments[$row->receipt_id] = $row->comment; } } foreach ($delete as $value) { //$result = db_query("delete from uc_payment_receipts where receipt_id=%d",$value); echo $value.' deleted
'; } ?>