View Single Post
  #8  
Old 30th April 2013, 20:43
lee.veal lee.veal is offline
Member
 
Join Date: Apr 2013
Posts: 34
Thanks: 6
Thanked 5 Times in 5 Posts
Default

Code:
                // Delete all forwardings where the osurce or destination belongs to this domain
                $records = $app->db->queryAllRecords("SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@".$app->db->quote($domain)."' OR (destination like '%@".$app->db->quote($domain)."' AND type != 'forward'");
                foreach($records as $rec) {
                        $app->db->datalogDelete('mail_forwarding','forwarding_id',$rec['id']);
                }
Reply With Quote