Re: DB_DataObjects getLinks() bug?

From: Date: Fri, 08 Jul 2005 20:04:48 +0000
Subject: Re: DB_DataObjects getLinks() bug?
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19923@lists.php.net to get a copy of this message
Right, 'warriorID' is the name of the field which links to another table (I had the warrior.links.ini below the schema) but since it works for getting the single record I think I'm ok. I know I named it items, and I'm not sure if I could get multiple results but right now I'm only expecting a single item per warrior. It could be warriorItem just as easily. mark Justin Patrin wrote:
On 7/8/05, Mark Petersen <markp@cherryone.com> wrote:
Justin, Thanks, but I must be doing something wrong... $warrior->find(); while ($warrior->fetch()) { print_r($warrior); $warriorItems =& $warrior->getLink('warriorID');
Is warriorID the name of the field which links to another table? Also, you're naming this wrriorItems which means to me that you're expecting multiple records. You only get one record back from a link.


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