Error on adding new record

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
winsonlee
Forum Commoner
Posts: 76
Joined: Thu Dec 11, 2003 8:49 pm

Error on adding new record

Post by winsonlee »

I have a field name customer id which is a primary key. So everytime when a user tried adding a customer id which existed in the table, it will comes out an error msg. I would like to know how am i able to handle such error msg ? Eg .. if customer id exist, then an error msg will be printed out. For your information i am using oracle as my database.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hmm.. well.. you could check to see if the customer id exists already (with a select). if so, output your own error message.
Post Reply