Handling Database errors in php
| From: | manoj nahar | Date: | Fri, 05 Dec 2003 12:06:34 +0000 |
| Subject: | Handling Database errors in php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171970@lists.php.net to get a copy of this message | ||
Hi guys,
Column of table defined as primary key. there is violation and error message from database.
1) First way is to check if the value is already in database and then contuninue with insert
(this invloes an extra select for every insert and leaves defined primary key redundant)
What is the best approach to be followed for this scenario.?
what if there are several constrains defined on a table?
cheers
Manoj