Welcome Guest, Not a member yet? Register   Sign In
Having error message show when stored procedure not successfull
#1

[eluser]bleu[/eluser]
I am using a stored procedure which inserts data in a table.
Now if I am inserting data with a primary key value which already exists in the table, then it should provide an error but currently it is taking me to this page
Code:
A Database Error Occurred

Error Number: 0

call spInsertabc('primary_key_value_which_already_exists','edd')

Filename: models/abc_model.php

Line Number: 46





I would like to return a proper message(such as "Cannot be inserted right now try again" or "Primary key already exists") to the user along with the page on which he submitted the daa if there exists a similar primary key value or if there is an error when inserting data.

How can I achieve that?

I am using codeigniter 2.1.0





Messages In This Thread
Having error message show when stored procedure not successfull - by El Forum - 04-24-2012, 03:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB