Actually, all you need for the table relationships to work is the $_referenceMap in the dependent table's class definition.
The $_dependentTables variable is optional. This is needed only if you want to perform cascading UPDATE and DELETE operations in PHP code. This is not needed if you use constraints in your database to perform referential integrity. I recommend utilizing database constraints, it's safer and gives better performance. Regards, Bill Karwin > -----Original Message----- > From: Maurice Fonk [mailto:[EMAIL PROTECTED] > Sent: Friday, May 04, 2007 5:23 PM > To: José de Menezes Soares Neto > Cc: [email protected] > Subject: Re: [fw-general] Working with two or more tables > > Hi again! > > Have a look at > http://framework.zend.com/manual/en/zend.db.table.relationship > s.html . I know it seems complicated at first, but you'll > learn to appreciate it quickly. For your example, I could > imagine that the table userinfo depends on the table user, so > you'd put: > > protected $_dependentTables = array('Userinfo'); > > in the class definition for User. Then you could use the > magic function: > > $user->findUserinfo() > > on a User Row. > > MF > > José de Menezes Soares Neto wrote: > > Hi again my friends! > > > > Now, I need to work with two or more tables, each table has some > > information I need. > > For example, table USERS has the users, but I need too > table USERINFO, > > which have the user information... > > > > I created a class that extends Zend_Db_Table_Abstract: > > > > class Users extends Zend_Db_Table_Abstract { > > protected $_name = 'users'; > > } > > > > But, I would like to manage more tables, and get flexibility to > > combine then... these kind of things... > > > > Best regards, > > > > José > > > -- > Maurice Fonk > > [EMAIL PROTECTED] > http://naneau.nl/ > > Scio me nihil scire > >
