Welcome Guest, Not a member yet? Register   Sign In
How to get the SQL error message
#1

[eluser]fMertins[/eluser]
Hi, I´m using the simple_query() function to execute a delete statement, like this one (in a model):

Code:
public function delete($id) {
   $id = (int) $id;
   $bdok = $this->db->simple_query("delete from cliente where idcliente = {$id}");
   return $bdok;
}

So, if the statement fails, returnt FALSE. But how may I get the error message from database? For example, a foreign key violation message...

Thanks!
Fernando
#2

[eluser]fMertins[/eluser]
Hello... Anyone know if this is possible to implement? Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB