Re: db_Dataobject join

From: Date: Fri, 07 May 2004 13:43:13 +0000
Subject: Re: db_Dataobject join
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12346@lists.php.net to get a copy of this message
Hello Danny, It's not table.links.ini but databasename.links.ini. Create this file at the same place where your databasename.ini is. [menuaccess] menuid = menu:menuid . and try this code: $do = DB_DataObject::factory('menuaccess'); $do->usertypeId = <paste your user type stuff here>; if ($do->find()) { while ($do->fetch()) {
       $do->getLinks();
       echo $do->_menuId->menuName;
} } Regards, Norbert Mocsnik Danny Younes wrote:
Hi , I am having a problem with the pear class DB_DataObject. I have 2 tables; menu which consists of the following fields: menuId menuName menuLink menuOption menuTarget menuParent sequence and menuaccess which has the following fields: menuId usertypeId now I have the value of usertypeId. I am trying to get the menu items which belong to a specific usertypeId. I am having problems joining these 2 tables together. I have tried everything; addJoin(), getLinks() and nothing has worked. I only get data from one table. Plus what is the code to load the table.links.ini file having problems with this. Could you please shed some light onto this please. cheers
Danny Younes Web Application Developer SitePoint Pty. Ltd. e: danny@sitepoint.com w: http://www.sitepoint.com/


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