Welcome Guest, Not a member yet? Register   Sign In
Model sharing variables in functions? [solved]
#3

[eluser]xwero[/eluser]
The get_products query seems very odd are you sure you didn't forget a part of the code?

I assume the products.pDesignerId isn't the same as the designer.dDesignerId.

But to get the rate in the get_royalty_rate you have to return $row->dPercentages instead of $query->result() and then you can do this in the get_products method
Code:
$this->db->select('pSku,pName,oPrice,oSku,rTimeStamp, sum(oQuantity) as quan, ((oPrice*' . $this->get_royalty_rate($id) . '/100)*sum(oQuantity)) as salesProfit');


Messages In This Thread
Model sharing variables in functions? [solved] - by El Forum - 08-05-2008, 01:35 AM
Model sharing variables in functions? [solved] - by El Forum - 08-05-2008, 01:43 AM
Model sharing variables in functions? [solved] - by El Forum - 08-05-2008, 01:48 AM
Model sharing variables in functions? [solved] - by El Forum - 08-05-2008, 02:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB