Welcome Guest, Not a member yet? Register   Sign In
database class, helpers and errors?
#1

[eluser]mrh[/eluser]
Hello all...

Being new to CodeIgniter one thing has puzzled me. I love the database class, query helpers, etc. They all work great and seem to simplify coding in many ways.

One thing I'm puzzled about is there does not seem to be direct support for errors unless I'm missing it. I see that queries can return either data or TRUE/FALSE. But if a query returns no data or FALSE are we just supposed to do our own call to mysql_error() to figure out what went wrong or did I miss something?

M
#2

[eluser]Oscar Dias[/eluser]
I'm not sure where I got this from and whether it works all the time, but I use:
Code:
$this->db->_error_message()
Give it a try... I log my database errors using this method.
#3

[eluser]mrh[/eluser]
Thanks! I have looked through the user guide and I don't remember seeing that call. I also see it is prefixed with an _ so I'm wondering if it is not intended for public use for some reason.

Thanks for taking the time to reply though!




Theme © iAndrew 2016 - Forum software by © MyBB