I'm creating a web application using codeigniter and postgresql. I have this inside my database:
user
id name
unique(name)
When someone try to register with the same name, i get an error. How can i handle them, without displaying the codeigniter's error and showing instead my custom error?
If i set $db['default']['db_debug'] = FALSE;
i don't get any error of course, but is there a way to handle the db error or should i check myself if the table already contains an entry with that same name?