Welcome Guest, Not a member yet? Register   Sign In
function help [solved]
#1

[eluser]superfake123[/eluser]
Hello,

How/where can I put this function so that I can access it from within any controller/model or view etc?

Code:
function get_setting($setting)
{
$query = $this->db->where('setting_name',$setting)->get('settings')->row();
return $query->value;
}

I tried putting it in a helper but the db class doesn't work from helpers I guess?


Thanks!


Messages In This Thread
function help [solved] - by El Forum - 02-10-2012, 03:07 PM
function help [solved] - by El Forum - 02-10-2012, 03:16 PM
function help [solved] - by El Forum - 02-10-2012, 03:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB