Try to design your tables so, that it would be impossible to enter
dublicate primary keys. And don't let users (if it's CGi application) to
set or play with your primary keys (well, we could talk more about this
one).
If you used AUTO_INCREMENT, or UNIQUE, I bet you wouldn't have such
problem.
Still, dealing with this issue depends on the nature of the application
-sherzodR
-------------------------
-sherzodR
phone: (517) 774-2702
email: [EMAIL PROTECTED]
On Wed, 27 Jun 2001, Werner Stuerenburg wrote:
> I get Duplicate entry errors quite frequently. As a rule in these
> cases, I check whether a record with this key exists, and in case
> it does not, take action and insert the record. So there is a
> minimal time lag, where by chance someone else may have inserted
> exactly that record. Am I right?
>
> Another explanation is that the key went wrong, and indeed in
> most cases this is so, whence I get a number of such erros in a
> row (I send myself an email automatically whenever an error
> occurs so that I get to know it). But sometimes I get this error
> in a single instance an ismchk finds no fault with the table.
>
> The key in turn may turn wrong when error log says
>
> mysqld process hanging, pid 28635 - killed
>
> or
>
> Aborted connection 34111 to db: 'pferdezeitung' user: 'pferdezeitung'
>
> More about the latter if someone is interested. Anybody any
> suggestions? I myself am clueless.
>
> --
> Herzlich
> Werner Stuerenburg
>
> _________________________________________________
> ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
> Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
> http://pferdezeitung.de
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php