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 2 joins to same table
On Mon, 29 Nov 2004 16:51:57 -0800, Ken Restivo <ken@restivo.org> wrote:
> On Mon, Nov 29, 2004 at 03:10:42PM -0800, Justin Patrin wrote: 
kind of schema. 
>
> My understanding of crosslinks and triplelinks, is that they  generate a bunch of 
checkboxes. That's not what I'm talking about. I'm talking about how one enters and 
links back and forth to editing the crosslinked records. As a bonus, I need to show 
all
the data for those sub-records in tabular form as a sub-table-- not just $fb_linkDisplayFie
lds.
>
> Simple example: let's say, using the above schema, that I want to display all the 
data for a user, including all his or her cars. *Only* his or her cars. Likewise, I 
want to be able to add a new user, then add the cars for that user.  Or, when editin
g t
hat user's data, be able to add a new car to their record or delete one.
>
> Sure, I could use crosslinks to show an array of *every* car in the database, rega
rdless whether it has anything to do with this user, and check off which are his or 
hers. But that's impractical in a database of hundreds of records, and it isn't what
 I'
m trying to do anyway.
>
> I'm not sure I'm explaining myself very well, but suffice to say I'm prett
y confident that crosslinks are going to do it.
>

True, the crosslinks code isn't practical for lots and lots of
entries. In this case you have to do something on your own. If all you
need to do is enter new car records which are connected to a person
you could easily just make the car link back to the person. Then
auto-fill the link field with the person's ID.

Or, if you want to have the many-many relationship you can auto-enter
a record in the man-many table based on the chosen user, then when you
want to add a car just show the form for the many-many table with the
user auto-selected.

For the auto-selected parts you could even make a static form element
and set it yourself (using preGenerateForm / preProcessForm, etc.).

--
Justin Patrin

Report this thread to moderator Post Follow-up to this message
Old Post
Justin Patrin
11-30-04 08: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:19 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.