Welcome Guest, Not a member yet? Register   Sign In
Unable to pass variable from one function to another function
#3

[eluser]CroNiX[/eluser]
This line has several problems:
Code:
$state = ($this->Dealer_data->get_state_from_the_id($id) > 0) ? FALSE : TRUE;

First, get_state_from_the_id() is returning an OBJECT of a result set, since you return $query->result().
So you are saying, if (OBJECT > 0), which will most likely cause an error since you can't compare an INT to an OBJECT like that.

Then, you cast the result as a boolean. So $state will only be TRUE/FALSE, and not hold the state data.


Messages In This Thread
Unable to pass variable from one function to another function - by El Forum - 01-26-2014, 01:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB