Welcome Guest, Not a member yet? Register   Sign In
how can I access database in a helper function ?
#6

[eluser]sudinem[/eluser]
[quote author="PDP" date="1268738102"]
Code:
function i_rock()
{
    $CI =& get_instance();
    $CI->db->get('table_name');

    // OR

    $CI->load->model('your_model');
    $result = $CI->db->get_the_contents_of_your_table();
}

This above code is not working...

You have load the model but you haven't call the function inside the model..How to call the functions of model in helper.

Sudinem


Messages In This Thread
how can I access database in a helper function ? - by El Forum - 03-15-2010, 08:30 PM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 12:15 AM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 04:17 AM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 12:43 PM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 12:56 PM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 12:59 PM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 01:13 PM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 01:26 PM
how can I access database in a helper function ? - by El Forum - 03-16-2010, 01:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB