On Tue, 16 Jan 2001, ±i®p»Ê wrote:

> 
> Hi,  happy new year!!
> 
> Yesterday morning,  I  operated  MySQL  (3.23.28) 
> insert  some data  into a table ,
> I found  a  error and  could not find any one can help 
> with:
> -------------------------------------------------
> Welcome to the MySQL monitor.Commands end with ; or \g.
> Your MySQL connection id is 117 to server version: 
> 3.23.28-gamma
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the 
> buffer
> 
> mysql> use gon;
> Database changed
> mysql> insert into mymp3 (myclass)values('class_four');
> 
> 
> ERROR 1062: Duplicate entry '127' for key 1
> 
> mysql>
> -----------------------------------------------------
> Could you please tell me what's wrong with and how to 
> deal wiht it ?
> Thanks!!
> 
>  fongming  from Taiwan  ,2001/1/15
> 


Looks like you're trying to insert a UNIQUE value in your database that
already exists. do a "SELECT count(myclass) FROM mymp3 WHERE myclass =
'class_four'". If that returns 1, the value already exists. This is caused
by the record variable set to PRIMARY KEY or UNIQUE, which prevents you
from having two of the same values :)


Atle


---------------------------------------------------------------------
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

Reply via email to