Re: DB_DataObject_FormBuilder and relationships
| From: | Justin Patrin | Date: | Fri, 20 Jan 2006 05:35:23 +0000 |
| Subject: | Re: DB_DataObject_FormBuilder and relationships | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22621@lists.php.net to get a copy of this message | ||
On 1/19/06, Jack Lewis <jacklewis2@gmail.com> wrote:
>
> Are there any examples or tutorials that show how to use FormBuilder
> with relationships? So far I only have found simplistic examples with
> one table. Specifically, I want to easily generate a form for
> manipulating these tables:
>
> INVOICE
> * invoice_id
> * date
>
> INVOICE_ITEMS
> * invoice_item_id
> * invoice_id
> * units_purchased
> * price_per_unit
>
One of the main features of FormBuilder is to deal with links,
otherwise known as foreign keys. The first step is to se up your
db.links.ini for your database (this is a DB_DO thing). Then linked
fields will show up automatically as select fields. They you can use
crossLinks, tripleLinks, reverseLinks, and linkNewValue to do all
sorts of other fun stuff.
For a more complicated example try:
http://pear.reversefold.com/example/source/example.tgz
This example requires pearified.com/DB_DataObject_FormBuilder_Frontend to run.
--
Justin Patrin