Welcome Guest, Not a member yet? Register   Sign In
How can I intercept database requests error?
#1

[eluser]FordEscort[/eluser]
I have just started working with Code Igniter a while and I think it's very interesting.
I'm facing a problem with handling errors.
When running requests that produce database errors (duplicate entry violation for example), the script is exiting and displays the error.
I want to do something like this :
Code:
if ($this->db->update('MyTable', $arrCol))
{
    return true;
}
else
{
    return false;
}

So that the script is not stopped.
Is this possible?;

Thanks.


Messages In This Thread
How can I intercept database requests error? - by El Forum - 10-01-2009, 06:49 AM
How can I intercept database requests error? - by El Forum - 10-01-2009, 06:54 AM
How can I intercept database requests error? - by El Forum - 10-01-2009, 07:24 AM
How can I intercept database requests error? - by El Forum - 10-01-2009, 08:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB