|
<?php defined('SYSPATH') or die('No direct script access.');
|
|
/*
|
|
* This file is part of open source system FreeNetIS
|
|
* and it is release under GPLv3 licence.
|
|
*
|
|
* More info about licence can be found:
|
|
* http://www.gnu.org/licenses/gpl-3.0.html
|
|
*
|
|
* More info about project can be found:
|
|
* http://www.freenetis.org/
|
|
*
|
|
*/
|
|
|
|
/**
|
|
* @package Model
|
|
*/
|
|
class Messages_ip_addresses_Model extends Model
|
|
{
|
|
|
|
|
|
public function get_redirections_of_ip_address($ip_address_id)
|
|
{
|
|
return $this->db->query("
|
|
SELECT m.id, m.name, mip.ip_address_id, mip.message_id
|
|
FROM messages m
|
|
JOIN messages_ip_addresses mip ON mip.message_id = m.id
|
|
WHERE mip.ip_address_id = ?
|
|
", $ip_address_id);
|
|
}
|
|
|
|
}
|