foreach ($this->db->fetchAll($query, $user_id) as $row) {
                    if (!in_array($row['privmsgs_id'], $return)) {
                        $return[] = $row['privmsgs_id']; 
                    }
                }