public function deleteMe()
 {
     if ($this->id > 0) {
         $ratesTable = Cart66Common::getTableName('shipping_rates');
         $sql = "DELETE from {$ratesTable} where shipping_method_id=" . $this->id;
         $this->_db->query($sql);
         parent::deleteMe();
     }
 }
Esempio n. 2
0
 /**
  * Delete the account and all account subscriptions assoicated with this account
  */
 public function deleteMe()
 {
     if ($this->id > 0) {
         $sub = new Cart66AccountSubscription();
         $subs = $sub->getModels("where account_id={$this->id}");
         foreach ($subs as $s) {
             $s->deleteMe();
         }
         parent::deleteMe();
     }
 }