Welcome Guest, Not a member yet? Register   Sign In
return false in model - how to use this info in controller
#2

[eluser]Crafter[/eluser]
Just note that you are calling add twice. Is this what you want.
Code:
$this->handle_comments->add();
            if ($this->handle_comments->add() === FALSE)

Syntatically, a better way to write your if expression should be
Code:
$this->handle_comments->add();
            if ( ($somevar = $this->handle_comments->add() ) === FALSE)

You other problem is that $this->db->select() builds the SQL query to be executed, and is probably returning true.

You will beed tp rebuild your first if() statement to get this to run as desired.


Messages In This Thread
return false in model - how to use this info in controller - by El Forum - 08-31-2007, 05:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB