CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [Resolved] Display child table lookup results in parent table grid

Print topic Send  topic

Author Message
raknuth


Posts: 67
Posted: 01/07/2011, 4:03 PM

Hi. I have 2 tables.

Table1 (parent table) contains a list of people and their area code. It looks like this - fieldnames (type, length) [sample data]:
* people_id (int, 8, primary key) [00000001]
* first_name (char, 25) [Dick]
* last_name (char, 25) [Knuth]
* area_code (int, 8, foreign key) [00000001]

Table2 (child table) contains a list of area codes and the states in which they are assigned. It looks like this - fieldname (type, length) [sample data]:
* area_code_id (int, 8, primary key) [00000001]
* area_code (char, 3) [760]
* state (char, 2) [CA]

When I view a Grid of Table1 for the data shown above, the column 'area_code' displays the value '1'. I would like the it to display '760' (I'll create the extra column to display 'CA'. ).

Thanks.
View profile  Send private message
ReneS

Posts: 225
Posted: 01/10/2011, 12:44 AM

Hi,

For your grid, just use the visual query builder. Link area code id from the 2 tables and your done....

Rene
View profile  Send private message
raknuth


Posts: 67
Posted: 01/10/2011, 9:22 AM

Thank you, Rene. That was much easier than the 10 other approaches I stumbled through.
View profile  Send private message

Add new topic Subscribe to topic   


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

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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