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.
How can I change it or take a test to recover all the lines? I delete the unique key constraint ? Thank you.