[nycphp-talk] input..select help
Allen Shaw
ashaw at iifwp.org
Mon May 10 12:14:29 EDT 2004
> If you need to ensure records are unique, use primary and/or unique
> indexes on the columns in question. Doing this gets the database to
> automatically reject duplicates for you.
That, plus using IGNORE ("insert IGNORE into table_b(field1,field2) ...")
will have MySQL insert all non-duplicate records without choking on the
dupes.
- Allen
----- Original Message -----
From: "Daniel Convissor" <danielc at analysisandsolutions.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Monday, May 10, 2004 12:11 PM
Subject: Re: [nycphp-talk] input..select help
> On Mon, May 10, 2004 at 12:06:24PM -0400, Rahmin Pavlovic wrote:
> >
> > Which worked fairly quickly, however it also imported entries from
> > table_a that already exist in table_b.
>
> If you need to ensure records are unique, use primary and/or unique
> indexes on the columns in question. Doing this gets the database to
> automatically reject duplicates for you.
>
> --Dan
>
> --
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> data intensive web and database programming
> http://www.AnalysisAndSolutions.com/
> 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
More information about the talk
mailing list