Re: AW: Dup Key Error Messages

2010-09-07 Thread Chris W
On 9/7/2010 3:33 AM, Thorsten Heymann wrote: Yes sure, but you will consider, it is more than a nice to have to let the user know what field he filled incorrectly (e.g. in a webform,...). And it would be nice to this in an automated way. I have to agree. Due to database design issues that th

AW: Dup Key Error Messages

2010-09-07 Thread Thorsten Heymann
..@oracle.com] Gesendet: Montag, 6. September 2010 20:03 An: Thorsten Heymann Cc: mysql@lists.mysql.com Betreff: Re: Dup Key Error Messages Hi Thorsten, all! Thorsten Heymann wrote: > Hi, > > First, I'm new to this mailing list, hopefully I'll do my post the *right* > way

Re: AW: Dup Key Error Messages

2010-09-06 Thread Shawn Green (MySQL)
On 9/6/2010 9:10 AM, Thorsten Heymann wrote: No, I think you misunderstood me. I have these keys (in this example) - PRIMARY (id) - UNIQUE (ip_addr) - UNIQUE (print_name) And when of of the UNIQUEs is duplicated, I'll wshow user a message WHAT key is a doublette.

Re: Dup Key Error Messages

2010-09-06 Thread Joerg Bruehe
Hi Thorsten, all! Thorsten Heymann wrote: > Hi, > > First, I'm new to this mailing list, hopefully I'll do my post the *right* > way. > > I've a problem with duplicate key error messages. In my application I use a > table with multiple unique keys (ip_addr and print_name). Lets use this > ex

AW: Dup Key Error Messages

2010-09-06 Thread Thorsten Heymann
tompk...@googlemail.com] Gesendet: Montag, 6. September 2010 15:06 An: Thorsten Heymann Cc: mysql@lists.mysql.com Betreff: Re: Dup Key Error Messages Hi You have a PRIMARY KEY of just the id field like PRIMARY KEY ( `id` ). You need both ip and type to be the primary key Cheers Neil On Mon, Sep 6, 2010

AW: Dup Key Error Messages

2010-09-06 Thread Thorsten Heymann
Not the answer I hoped to get but, thanks Carsten! -Ursprüngliche Nachricht- Von: Carsten Pedersen [mailto:cars...@bitbybit.dk] Gesendet: Montag, 6. September 2010 15:17 An: Thorsten Heymann Cc: mysql@lists.mysql.com Betreff: Re: Dup Key Error Messages On Mon, 6 Sep 2010 15:02:24 +0200

Re: Dup Key Error Messages

2010-09-06 Thread Carsten Pedersen
On Mon, 6 Sep 2010 15:02:24 +0200, Thorsten Heymann wrote: > Digging through mysqld source, I found this behaviour handled in > sql/handler.cc and changed from printing key_nr to key.name between this > versions. :( > > Is there a possible better, reliable way to detect what key is duplictated >

Re: Dup Key Error Messages

2010-09-06 Thread Tompkins Neil
Hi You have a PRIMARY KEY of just the id field like PRIMARY KEY ( `id` ). You need both ip and type to be the primary key Cheers Neil On Mon, Sep 6, 2010 at 2:02 PM, Thorsten Heymann wrote: > Hi, > > First, I'm new to this mailing list, hopefully I'll do my post the *right* > way. > > I've a p

Dup Key Error Messages

2010-09-06 Thread Thorsten Heymann
Hi, First, I'm new to this mailing list, hopefully I'll do my post the *right* way. I've a problem with duplicate key error messages. In my application I use a table with multiple unique keys (ip_addr and print_name). Lets use this example: Table `device` : CREATE TABLE `device` ( `id` INT NOT