Re: Data Object get() doubt

From: Date: Sat, 12 Feb 2005 01:15:37 +0000
Subject: Re: Data Object get() doubt
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17501@lists.php.net to get a copy of this message
On Fri, 11 Feb 2005 23:03:27 -0200, Jacques <iacques@yahoo.com.br> wrote: > Hi people! > > I have a table with primary keys that have two fields. Its possible use > the get() method with this? > > If a PK use one field, i call $object->get('12'); # 12 is a id > > but if i have 2 fields in pk? > > Excuse-me for confusion! > Not only get() but many other things won't work. DB_DataObject doe snot currently support primary keys of more than one field. I would suggest you create an auto incrementing id field for the primary key, then add a unique constraint on the other two fields. This way you have your uniqueness *and* a simple primary key. -- Justin Patrin

« previous php.pear.general (#17501) next »