Buy Now
Sign in

Save CC6 Table Data to DB

vividal , February 12 2018
V
vividal 117
February 12 2018 #375306
Need some real help here. I need to get this working by Wednesday.
I have a table with a team_id (static, user can't change it) and a div_id. User selects the div_id from a dropdown for each team that needs updating. then they click the Update List Button. That calls a save_tdt_loop which in turns calls my Save Data function. I need to insert a new record into the DB. I have all tried all sorts of Save Data-Data override on Insert variations but the fields remain NULL.
Help with what the syntax for my Data override on insert should be is greatly appreciated.
My last try for the Save Data is
Data provider {data:}
Data override on insert has:
tourn_div_id:{var:save_tdt_loop.data.div_id}
season_id:1
team_id:{var:data:team_id}
Debug looks like this, (repeats removed)
Array
(
[option] => com_chronoconnectivity6
[cont] => manager
[conn] => sectional-teams-add
[event] => update_list
[team_id] => Array
(
[0] => 7
[1] => 8
[2] => 6
)

[div_id] => Array
(
[0] => 4
[1] => 3
[2] => 1
)

[intercom-id-tvfkokak] => 15798103-86f9-464c-9027-ab218218f9a9
[intercom-lou-tvfkokak] => 1
[5c8a1c575b995dbdf3c3e56651c22852] => 1f22b9ab05a1ca45b65594e11e33922c
[joomla_user_state] => logged_in
[88ce27ccca7738dcd49df6b5d9f53e1b] => 1f3100eb8c5ba25143847cdabf95cc5f
)
Array
(
[update_tdt] => Array
(
[data] => Array
(
[option] => com_chronoconnectivity6
[cont] => manager
[conn] => sectional-teams-add
[event] => update_list
[team_id] =>
[div_id] => Array
(
[0] => 4
[1] => 3
[2] => 1
)

[intercom-id-tvfkokak] => 15798103-86f9-464c-9027-ab218218f9a9
[intercom-lou-tvfkokak] => 1
[5c8a1c575b995dbdf3c3e56651c22852] => 1f22b9ab05a1ca45b65594e11e33922c
[joomla_user_state] => logged_in
[88ce27ccca7738dcd49df6b5d9f53e1b] => 1f3100eb8c5ba25143847cdabf95cc5f
[tourn_div_id] =>
[season_id] => 1
)

[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `LO_TournamentDivisionTeams` (`team_id`, `tourn_div_id`, `season_id`) values ('', '', '1');
)

[var] => Array
(
[team_id] =>
[tourn_div_id] =>
[season_id] => 1
[aid] => 370
)

)

)
admin 25.9
February 15 2018 #375406
Hi Vividal,
Your setup looks ok apart from the "team_id" in the data insert override, but you better have a debugger inside the loop after the "data save", that would display the latest save data processing info, and which data was used.
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
admin 25.9
February 15 2018 #375407
Hi Vividal,
Your setup looks ok apart from the "team_id" in the data insert override, but you better have a debugger inside the loop after the "data save", that would display the latest save data processing info, and which data was used.
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
admin 25.9
February 15 2018 #375408
Hi Vividal,
Your setup looks ok apart from the "team_id" in the data insert override, but you better have a debugger inside the loop after the "data save", that would display the latest save data processing info, and which data was used.
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!