• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.