How to display many fields matching 1 id

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
bhardison
Posts: 1
Joined: 2019-06-17 12:15

How to display many fields matching 1 id

Post by bhardison » 2019-06-17 17:00

I'm SURE this is in the forum somewhere and I just don't know the correct terms to search for it. So please be kind to this AppGini/ SQL newbie :oops:

I have 2 tables. 1 is a client info table client_info and the other is domain_info. We lease websites to professional clients based on their areas of expertise. I'll use truck sales as an example. 1 client may lease websites on multiple domains for example: vintagepickups.com gmcworld.com world-o-trucks.com, etc all attached to a single id. In my online view of client_info I would like to display all of the domains assigned to his/her id in the domain_info table.

In phpmyadmin I can use

Code: Select all

SELECT `domain` FROM `domain_info` WHERE `lease_client` = '1260' 
to display a single id's domains. The 1260 exists in the id field in client_info table and as lease_client field in domain_info.

How would I do something similar for the described results for all clients?

Thanks in advance for any help / examples / tutorials you can send my way.

Bill
American by birth
SOUTHERN by the grace of God

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: How to display many fields matching 1 id

Post by onoehring » 2019-07-02 15:33

Hi

does't it work by default? When you have a lookup field in your domain_info table where you select the client_info primary key?
When you then select the client in the "overview" table, you will get his details and below those details all entries from domain_info that carry his primary key.

Olaf

Post Reply