Welcome Guest, Not a member yet? Register   Sign In
Looking for return on chained model calls
#1

[eluser]jbly[/eluser]
hey there,

i'm a n00b, so this is probably a totally n00bish question. i have a series of checkmarks for an app to work, things that need to be checked against the db

i'm calling the first model function, setting it to a variable and then checking if the variable returns true. it was working fine when i originally had a simpler process and just the one function. now, however, that model function calls another one (which in turn calls one, ends up being about 4 functions chained in the end).

on the last function call, i'm getting the value i'm after (when running echo or print_r etc), but the if statement in the controller isn't geting that value for some reason. i'm guessing it's because it's checking against the variable which only carries the return value of the first function it calls, not the subsequent functions called by it?

if so, what's the best way to handle this chaining and returning of the value? thanks for any help-




Theme © iAndrew 2016 - Forum software by © MyBB