DB_DataObject_FormBuilder : 1:many relation

From: Date: Thu, 14 Apr 2005 16:32:33 +0000
Subject: DB_DataObject_FormBuilder : 1:many relation
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18754@lists.php.net to get a copy of this message
Hi, I would like to manage a 1 to many relationship in one single form. Explanations : I have a DOCUMENTS table and a AUTHORS tables. A document can have multiple authors associated to it. An author can only be associated with one document. The DOCUMENTS primary key is DOC_ID (identity). AUTHORS has a foreign key to DOC_ID. I would like to be able to generate a form that allows me to fill in the values for a document and for the author at the same time . For instance : document title : ___ document description : ___ author name : ___ How can I generate such a form? I tried to use Nested forms, but I cannot figure out how I can tell the AUTHORS.DOC_ID field to be set to the newly inserted DOCUMENT.DOC_ID value. Am I clear? :o) Thanks in advance for your help. Thomas Balthazar.

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