Re: DB_DataObject link problem (Does DB_DataObject try to set up auto links?)

From: Date: Tue, 22 Mar 2005 18:40:22 +0000
Subject: Re: DB_DataObject link problem (Does DB_DataObject try to set up auto links?)
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18237@lists.php.net to get a copy of this message
Jachin Rupe wrote:
catalogs +---------+---------------------+------+-----+---------+----------------+ | catalogs +---------+---------------------+------+-----+---------+----------------+
| Field   | Type                | Null | Key | Default | Extra          |
+---------+---------------------+------+-----+---------+----------------+
| id      | tinyint(3) unsigned |      | PRI | NULL    | auto_increment |
| catalog | varchar(255)        |      |     |         |                |
+---------+---------------------+------+-----+---------+----------------+
Mmmm... ASCII Art in email. :-)
So I created a links.ini file that looks like this: [catalogs] id = products:catalog_id [products] catalog_id = catalogs:id
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. -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson

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