Re: DB_DataObject link problem (Does DB_DataObject try to

From: Date: Tue, 22 Mar 2005 19:22:54 +0000
Subject: Re: DB_DataObject link problem (Does DB_DataObject try to
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18242@lists.php.net to get a copy of this message
On Tue, 22 Mar 2005 13:00:31 -0600, Jachin Rupe <jachin@csihosting.com> wrote: > Wow an answer with only part of the question. Very impressive. > > > There's your problem (or at least a problem). I'm assuming that > > catalogs.id is the primary key of the catalogs table. As specified > > here, you're telling it that it's a foreign key to the products table. > > Presumably that's not what you want. You only need specify > > foreign_key=where it points to. > > > > So if I understand you correctly all I should have in my links.ini file > is this: > > [products] > catalog_id = catalogs:id > > If I want to do this: > > $product->get(1); > $product->getLinks(); > > And products.catalog_id is a foreign key that points to catalogs.id? > Yes, this is right. -- Justin Patrin

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