Welcome Guest, Not a member yet? Register   Sign In
Helper or Model for DB functions ?
#1

[eluser]ka-spot[/eluser]
I want to use functions like this:

Code:
function get_default_language()
{
    $CI =& get_instance();
    $CI->load->database();
    
    $CI->db->select('language')->from('languages')->where('default', 1);
    $get = $CI->db->get()->row();
    return $get->language;
}

inside different models like pages, products, categories, etc.
I'm learning CI while developing online store.


Currently i'm using helpers, but is it ok with the concept of MVC/CI?.

Wich one is better and why?


Messages In This Thread
Helper or Model for DB functions ? - by El Forum - 05-11-2012, 07:08 AM
Helper or Model for DB functions ? - by El Forum - 05-11-2012, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB