I'm not sure this is the best solution, but whenever I am inserting a
lot of records with the possibility of some of those records already
existing and I have no reason to update the existing records with new
data, I use 'INSERT IGNORE'. I'm not sure if that will 'ignore' other
errors that you may want to show. I would read up about it here....
http://dev.mysql.com/doc/refman/5.1/en/insert.html
Richard Reina wrote:
> I have a perl script that periodically reads and enters (via perl->DBI parsed
> system output (about received faxes) into a table. Since the old output is repeated I
> have put, when creating the table, the UNIQUE key on the field of the faxname, which is
> always different (something like fax000007879.tif)
>
> Every time the script is run many of the old faxes that have already been entered
> into the table are still on the server (as I would like them to be). As a result MySQL
> via execute() dutifully warns about all the duplicate errors. Is there anyway to redirect
> that output so the it does not appear as standard output? Or is it a bad idea to do so and
> should I being doing a different sort ow query altogether?
>
> Thanks,
>
> Richard
>
>