修改请求SQL

I have a table SQL and I fill it from an Excel File. The problem is many fields are repeated. For example:

FOURNITURE      MFC       SERIE  
FOURNITURE      MFC       SERIE 
FOURNITURE      MFC       SERIE 

Here in my table, I find just one line. It jumps up all the rest. However, I need to get all the lines.

My request is:

if ($articleid == 'DIEPRESTATION' || $articleid == 'DIEDIVBIEN' ||$articleid =='DIEDIVERS')
{
    if(!($this->_db->query("INSERT INTO `article` (`ID_Article`, `Designiation`, `Ident`, `ID_LRU`) VALUES ('".$articleid."', '".$designation."', '".$ident."', '".$IdLRU."');")))
{   
        if ($LRU != 'new')
        {
          return $this->_db->query(" UPDATE  `FLOOSE`.`article` SET  `ID_LRU` =  
          '".$IdLRU."' WHERE  `article`.`ID_Article` =  '".$articleid."' AND  
            `article`.`Designiation` =  '".$designation."' AND  
             `article`.`Ident` =  '".$ident."' LIMIT 1 ;");
        } 
        else {
                return false;
            }
        } else{
            return TRUE;
        }
    }

I think I have a unique key constraint on two table columns. screen sheet of the structure of my table

How can I change it or take a test to recover all the lines? I delete the unique key constraint ? Thank you.

Yes you do have a unique constraint on your columns. And even more, the composite of ID_Article, Designiation is your primary key, which is per definition also unique.

You should

  1. remove that primary key: ALTER TABLE article DROP PRIMARY KEY;
  2. add another field (name it id to stick with conventions), and set it as primary key with auto-increment: ALTER TABLE article ADD id INT PRIMARY KEY AUTO_INCREMENT;