<?php

if (!defined('BASEPATH')) {
    exit('No direct script access allowed');
}

class Menu_Model extends MY_Model {

    function __construct() {
        parent::__construct();
    }
    function duplicate_check($location, $id = null) {
        if ($id) {
            $this->db->where_not_in('id', $id);
        }
        $this->db->where('location', $location);
        return $this->db->get('menus')->num_rows();
    }
}
