Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-12 Thread Kalok Lo
quot;Erik Price" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 1:10 PM Subject: INSERTing duplicate values to a UNIQUE-indexed table > Hello, everyone. > > I have a slight dilemma, and was wondering what the standard workaround > is. I have thre

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-08 Thread Kalok Lo
quot;Erik Price" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 1:10 PM Subject: INSERTing duplicate values to a UNIQUE-indexed table > Hello, everyone. > > I have a slight dilemma, and was wondering what the standard workaround > is. I have thre

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread Sommai Fongnamthip
If you need to update an old record in unique key, try to use REPLACE function. REPLACE could add if there has not existing record and update when it found a same unique key. Sommai, At 19:01 5/2/2002 +, DL Neil wrote: >HelloErik, > > > I have a slight dilemma, and was wondering what the

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread Erik Price
On Tuesday, February 5, 2002, at 02:01 PM, DL Neil wrote: > =option 2: whilst native-MySQL will give an errmsg in response to an > attempt to INSERT duplicates, PHP doesn't > have to pay attention! Check out MySQL_affected_rows(). David, I see... that's a good debugging tool, mysql_affected_r

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread DL Neil
HelloErik, > I have a slight dilemma, and was wondering what the standard workaround > is. I have three tables: owners (auto_increment primary key is > "owners_id"), objects (auto_increment primary key is "objects_id"), and > owners_objects (which is a foreign key table that I created, under > a

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread Erik Price
On Monday, February 4, 2002, at 01:48 PM, Marcus Collins wrote: > You can use REPLACE instead of INSERT -- see the manual entry: > > > http://www.mysql.com/documentation/mysql/bychapter/manual_Reference. > html#REPLACE> > Thanks Marcus! My knowledge of MySQL is pretty basic. It has also b

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread Marcus Collins
On Mon, 4 Feb 2002 at 13:10:29 -0500, Erik Price wrote: [ snip background ] > I am sure that many people have done this sort of setup. But what do > you do to get around the problem of INSERTing a pair of values that > already exist? Because the combinations in "owners_objects" are UNIQUE

Re: INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread Paul DuBois
At 13:10 -0500 2/4/02, Erik Price wrote: >Hello, everyone. > >I have a slight dilemma, and was wondering what the standard >workaround is. I have three tables: owners (auto_increment primary >key is "owners_id"), objects (auto_increment primary key is >"objects_id"), and owners_objects (which

INSERTing duplicate values to a UNIQUE-indexed table

2002-02-04 Thread Erik Price
Hello, everyone. I have a slight dilemma, and was wondering what the standard workaround is. I have three tables: owners (auto_increment primary key is "owners_id"), objects (auto_increment primary key is "objects_id"), and owners_objects (which is a foreign key table that I created, under a