Welcome Guest, Not a member yet? Register   Sign In
model function
#1

[eluser]diasansley[/eluser]
hello there is a small confusion here

IF i have a function in a model how is it accessed


say i have
Code:
class m_coupons extends WC_Model
{
    function __construct()
    {
        parent::__construct();
        $this->table = 'coupons';
        
    }


function getAllocatedCoupons($entry_id)
    {
        $this->db->where('entry_id', $entry_id);
        $result = $this->db->get($this->table);
        return $result->result_array();
    }


where and how would the image be called.

Thanks
#2

[eluser]SPeed_FANat1c[/eluser]
Quote:IF i have a function in a model how is it accessed

http://ellislab.com/codeigniter/user-gui...ml#loading ?
#3

[eluser]diasansley[/eluser]
thanks
#4

[eluser]SPeed_FANat1c[/eluser]
Quote:Total Posts: 45

I didn't believe that this is what you need actually Smile
#5

[eluser]diasansley[/eluser]
i was too tensed lol
i forgot they had the documentation in place!


thanks




Theme © iAndrew 2016 - Forum software by © MyBB