Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Transaction Patterns » Output 3 - _cm_output_multi()
Re: Output 3 - _cm_output_multi() [message #7633 is a reply to message #7632] Tue, 10 August 2021 06:34 Go to previous messageGo to previous message
htManager is currently offline  htManager
Messages: 434
Registered: May 2014
Senior Member
Sorry for confusing you. Probably this is because of my knowledge and the language. Sorry.

I try to explain it better:

The LIST2 screen has the outer entity orga_spiele which holds all the games/matches. The inner entity is orga_spiele_anwesenheit which holds the team members. In the team members table are fields where I can choose if the member participates in this match or not. Additionally there is a field where I can choose the position of the player in the game.

The OUTPUT3 task has the name orga_spiele_anwesenheit_einzel_position and is defined as subclass of orga_spiele and extends orga_spiele (as defined in the orga_spiele_anwesenheit_einzel_position.class.inc).

In the orga_spiele_anwesenheit_einzel_position(output3).php my $table_id is 'orga_spiele_anwesenheit_einzel_position' and $sql_from is 'orga_spiele' with two LEFT JOINS on related tables for getting information for the title.

If I now press the OUTPUT3 task in the LIST2 screen $where in _cm_initialise() in orga_spiele_anwesenheit_einzel_position.class.inc passes down the primary key fields and the primary key values of the inner table not of the outer table. The $selection string passes (correctly) down all selected occurences of the inner table (orga_spiele_anwesenheit).

I have a primary key consisting of 6 fields and the fields are normally different in each table as you advised in one of your articles to make it easier to identify the table fields. I use the following code to change the $where string in _cm_initialise() of orga_spiele_anwesenheit_einzel_position.class.inc:

$where = str_replace('spiele_anwesenheit_verbaende_art_id=', 'verbaende_art_id=', $where);
$where = ..... (for all 6 fields)

This works fine.

In the _cm_output_multi() method I am accessing the inner table (orga_spiele_anwesenheit) again to get the available players for the different positions. For better understanding I attached the output3 pdf file. Maybe you can better see what is wrong in my logic. As you can see each multi zone contains the available team members for this position.
  • Attachment: Output3.pdf
    (Size: 330.83KB, Downloaded 285 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: POPUP3 not working
Next Topic: Tree structure with more than one table
Goto Forum:
  


Current Time: Sun Nov 24 20:00:07 EST 2024

Total time taken to generate the page: 0.01417 seconds