<?php defined('SYSPATH') or die('No direct access allowed.'); class Model_Zone extends ORM { public static function get_zone_title($id = null) { $zone = ORM::factory('zone') ->where('id','=', $id) ->find(); return $zone->title; } public static function get_id($id = null) { $zone = ORM::factory('zone') ->where('title','=', $id) ->find(); return $zone->id; } }