CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Multiple joins for a field display

Print topic Send  topic

Author Message
Pat Friedl
Posted: 04/08/2002, 7:41 AM

Ok, I've got a little problem, and I'm not sure how to do it in Code Charge.

It seems that with CC, I can make a field display data from another table with a left join easily enough, but what if I'v got three tables from which I have to pull data?

For instance, I've got these three tables:

Channel:
RecID (key)
Description (varchar)

Division:
RecID (key)
Description (varchar)

Division_Map:
RecID (key)
DivisionID (foreign key - Division.RecID)
ChannelID (foregin key - Channel.RecID)

So from this schema, I can map a division to multiple channels. Don't ask me why, but the client like this type of spaghetti logic. }:(

Ok, so in a grid page, I'd like to display not only all the divisions, but if a division has more than one channel, display like this:

Division.RecID, Division.Description, Channel.Description(where Division_Map.DivisionID = Division.RecID & Division_Map.ChannelID = Channel.RecID)

The result would be that for each record in the division table, it would display the record, for as many channels that it has, pulling the channel descriptino from the channel table. Clear as mud?

So far, it doesn't look like I can get this complex with CodeCharge. How do you do this??? Thanks!


Alex Alexapolsky
Posted: 04/08/2002, 8:08 AM

You should create your own sql statement with multiple JOINS and
put it to Form Properties/SQL/"Custom SQL"

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.