Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] DB_DataObject_FormBuilder for many to many table?
On Wed, 30 Mar 2005 15:23:43 -0600, Brett Bieber <brett.bieber@gmail.com> wrote:
> I'm looking for an easy way to generate a spreadsheet with checkboxes
> (checked indicating a record exists) from a many to many table.
>
> Has anyone done something like this before?
>
> From the documenation for the api: "The crossLinks array holds data
> pertaining to many-many links. If you have a table which links two
> tables together, you can use this to automatically create a set of
> checkboxes on your form."
>
> which seems to say that this is easy to accomplish...    A form with
> drop downs (select/option pairs) for each relation is easily possible,
> but I can't figure out how to build an array of checkboxes.
>
> For example the first row would contain all records from table1, and
> the first column would contatin all records from table2... and if
> there were a record in the relationship table for
> table1.key,table2.key, a form checkbox would be checked in the
> corresponding cell.
>

Well....

I think what you're asking is for a form which shows a many-many
relationship as a table. Unfortunately, FormBuilder is record
oriented. This means that the crossLink part of a form, instead of
being a matrix, is a list. If you have a movie_song many-many table
and edit a movie record you get a list of all of the songs and the
option to connect them to the movie you're editing.

FormBuilder does do a matrix kind of thing, but that's for
tripleLinks. A many-many-many relationship. For example, a table which
links movies to languages and audio formats. So you can say that the
movie "Alien" is in English in Stereo and Dolby Digital, and in French
in Mono.

(Cue the fanfare!) Here's an example.
http://formbuilder.reversefold.com/index.html

Audio Formats is a tripleLink and Songs is a crossLink.

--
Justin Patrin

Report this thread to moderator Post Follow-up to this message
Old Post
Justin Patrin
03-31-05 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:00 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.