phpgroupware-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-users] Addressbook error?


From: Alejandro Borges
Subject: Re: [Phpgroupware-users] Addressbook error?
Date: Tue, 17 May 2005 16:17:08 -0500

El dom, 15-05-2005 a las 16:53 +0200, James Mohr escribió:
> Hello Lance!
> 
> I'm a newbie to PHPGroupWare, but I do have a little SQL experience. You say 
> you are trying to add some address information. Does this mean you are trying 
> to add information to an existing record? If so, then the SQL query that is 
> being done is very wrong here. This is doing an insert, which is going to 
> create a whole new record. 
> 
> Looking in my MySQL database, the primary key is the contact_addr_id field 
> which is auto increment, so it is logical to me that it is not listed as one 
> of the fields.  However, I am still confused as to why it is doing an insert 
> if you are updating existing data. Can you add new records OK?

Doesnt work that way. The addressbook has one record per person or
organization exlclusively in the contacts, person and org tables.

Addresses, phones, im, other-non-ordered data and catalogs are in other
tables.

So its perfectly normal that it tries an insert when adding an address
(you would allways need more than one table if you want to support a
contact that has an unlimited number of addresses, phones, emails...and
other data associated to them).

Not normal that it fails but, sadly, i havent been able to reproduce
that.
> 
> Regards,
> 
> Jim Mohr
> 
> On Saturday 14 May 2005 22:44, Lance Hoffmeyer wrote:
> > Hey all,
> >
> > I can add names and numbers and various information fine.  When I try
> > to add some address information to the addressbook but I keep getting
> > the error:  How do I fix this error so I can add information to this table?
> >
> > Lance
> >
> >
> >
> > *Database error:* Invalid SQL: INSERT INTO phpgw_contact_addr (add1,
> > state, add2, postal_code, city, country, addr_type_id, preferred,
> > created_on, created_by, modified_on, modified_by, contact_id) VALUES
> > ('', 'TX', '', '78026', '', '', 2, 'Y', 1116103161, 6, 1116103161, 6, 69)
> > *PostgreSQL Error*: 1 (ERROR: duplicate key violates unique constraint
> > "phpgw_contact_addr_pkey")
> >
> > *File:* -1
> > *Line:* -1
> >
> > *Session halted.
> > *
> >
> > *
> > *
> >
> > *
> > *
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]