$query=$this->db->query("SELECT * FROM ".TABLE_ARCHIVING_RULE." WHERE `from` LIKE ? OR `to` LIKE ? OR subject LIKE ? ORDER BY domain, id",array('%'.$s.'%','%'.$s.'%','%'.$s.'%'));
}else{
$query=$this->db->query("SELECT * FROM ".TABLE_ARCHIVING_RULE." ORDER BY id");
$query=$this->db->query("INSERT INTO ".TABLE_ARCHIVING_RULE." (`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`) VALUES(?,?,?,?,?,?,?,?,?)",array($data['from'],$data['to'],$data['subject'],$data['_size'],$data['size'],$data['attachment_type'],$data['_attachment_size'],$data['attachment_size'],$data['spam']));