Welcome Guest, Not a member yet? Register   Sign In
best practice of exposing data to a view
#2

[eluser]Michael Wales[/eluser]
Rather than return TRUE/FALSE from your models - why not return FALSE or any data?

That's the route I go - then, when passing data to the view (in the second parameter method your described) I determine whether everything is as it should be or if we have an issue.
Code:
<?
if ($myvar !== FALSE) {
  // do normal stuff
} else {
  // omg, die
} ?>


Messages In This Thread
best practice of exposing data to a view - by El Forum - 08-09-2007, 02:18 PM
best practice of exposing data to a view - by El Forum - 08-09-2007, 05:00 PM
best practice of exposing data to a view - by El Forum - 08-09-2007, 05:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB