Data display

bencsikzoli

New Member
Hi,

I have a list where I want to display a data from 2 other tables.

Main list where I want to display data:
- player_id
- points
- full_name (get the name from the player list)
- flag (get from countries based on the player's nationality)

Player list:
-player_id
- full_name
- country_code

Country list:
- country_code
- country_name
- country_flag (file upload field)

I want to use the calc element to display the values but I don't know how to create the DBjoins.
Can you help in this with some step by step list?

Thanks,
 
Thanks, this helped.

Is there a way to edit the order of fields in the list? Now I have the original list, then the joined player, then joined assoc in this order but I'd like to move player within the original fields.
If I go to the element edit it says it's a child element and can't be edited unless I unlink it.
 
You can change the order of groups (main and joined tables) in the Form setting "Group" tab. And you can change the order of elements within the Group like you usually would in Joomla by drag and drop.
Or if you want to move for example one element from the joined table to be the first, you can create a new group under your main form, move that one element to that group and move the group to first position in the form settings.

For moving elements around, you don't have to unlink them from the main item, but if you want to make any changes to the elements setting, you have to unlink it first.
 
Thank you, that worked.

Now the next problem occured.

I have a ranking list for doubles where I have player_id1 and player_id2. I joined the player list twice to this list because I'd like to display both names but in the list I get back the same name twice instead of getting back the 2 player names. Any idea?
 
So you have fields "player_id1" and "player_id2" in your "Ranking" table. And you made two joins:
1) from ranking.player_id1 to player.player_id
2) from ranking.player_id2 to player.player_id

And you get the same player name twice for the same row although you have different player_id's in player_id1 and player_id2 fields?
 
Yes, exactly. In the details I got ht e 2 names correctly but in the list view I have the same name twice.
For the country it's more difficult because I joined player.country_code to country.country_code and I did this twice.
 
That is really odd. I can't think of a reason right now, especially not seeing the whole setup.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top