⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set_relation_n_n: How to fill other fields in relation table



m643
  • profile picture
  • Member

Posted 15 November 2014 - 09:15 AM

Hi all,

 

I have 3 tables, results, goals en players. I want to register the goals for each player when adding a result. When I use the set_relation_n_n I'm getting only the players on the adding form but I can't get the numbers of goals on this screen. How can I do that?

 

Database

 

Results

resultid

home

away

home_score

away_score

 

Goals

resultid

playerid

numberofgoals   ->> this is the fields I want tot fill for each player when adding a result

 

Players

playerid

name


Amit Shah
  • profile picture
  • Member

Posted 16 November 2014 - 10:45 AM

technically not possible... with GC directly

there are 2 posibilities

1 - try writing the code yourself for generating the n_n relation output

2 - try writing a function and setting the function name as a field - concatinating the player name with the number of goals.

 

Hope that trick (2) works...

 

Happy GCing :)