Welcome Guest, Not a member yet? Register   Sign In
my own helper creating menu
#12

[eluser]InsiteFX[/eluser]
Your helper does not work because your function name is different then
the function_exists name! You need to give them both the same name!

Also if your use function helpers and you want to use like CI's database
then you also need to use the CI Super Object!
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('create_menu'))
{
    function create_menu($parent, $level) {
    
        $CI = get_instance();

        $query = $this->CI->db->get('menu');
        
        return $query->result();
    }
}

InsiteFX


Messages In This Thread
my own helper creating menu - by El Forum - 08-13-2011, 07:05 AM
my own helper creating menu - by El Forum - 08-13-2011, 10:37 AM
my own helper creating menu - by El Forum - 08-13-2011, 11:25 AM
my own helper creating menu - by El Forum - 08-13-2011, 12:04 PM
my own helper creating menu - by El Forum - 08-13-2011, 12:10 PM
my own helper creating menu - by El Forum - 08-13-2011, 12:14 PM
my own helper creating menu - by El Forum - 08-13-2011, 12:23 PM
my own helper creating menu - by El Forum - 08-13-2011, 12:42 PM
my own helper creating menu - by El Forum - 08-13-2011, 12:51 PM
my own helper creating menu - by El Forum - 08-13-2011, 01:17 PM
my own helper creating menu - by El Forum - 08-13-2011, 01:33 PM
my own helper creating menu - by El Forum - 08-13-2011, 07:06 PM
my own helper creating menu - by El Forum - 08-14-2011, 02:31 AM
my own helper creating menu - by El Forum - 08-14-2011, 04:04 AM
my own helper creating menu - by El Forum - 08-14-2011, 05:53 AM
my own helper creating menu - by El Forum - 08-14-2011, 06:28 AM
my own helper creating menu - by El Forum - 08-15-2011, 07:11 AM
my own helper creating menu - by El Forum - 08-15-2011, 07:34 AM
my own helper creating menu - by El Forum - 08-15-2011, 07:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB