List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 19 2002 2:00pm
Subject:Re: MySQL INSERT even if value is UNIQUE
View as plain text  
At 15:46 +0200 6/19/02, Anton wrote:
>SPAM APPEASER: db, database , SQL , MySQL
>Good Day
>I have a table that has fields set as Unique, this is great when users
>enter on a form and I don't care if their records don't make it to the
>Db if it is in the Db already, However.... Sometimes I want to upload a
>text file and using PHP insert the list into the Db , now when I get to
>a line that exist in this unique column already then the process stops
>with an error. How can I have a uunique record but that will simply skip
>that line and continue reading the rest of the file and inserting
>records. ?

If you're using LOAD DATA, use the IGNORE keyword.


MySQL INSERT even if value is UNIQUEAnton19 Jun
  • Re: MySQL INSERT even if value is UNIQUEPaul DuBois19 Jun
  • Re: MySQL INSERT even if value is UNIQUEVictoria Reznichenko19 Jun