gydi
New Member
There are 2 tables
1. Athletes names, team (id from table 2) and points - table pirgos2017 field:teams2017 field:sum
2. Name of the team and the sum of the points of the team (from 1 table) - table:teams field:id field:sumteam
Can a good soul write SQL
Which by "id" from table 2 "teams" sums from the 1st table the points of the team of the "sum" field and write them in 2 tables "teams" in the "sumteam" field ?
Something like
$ Db = JFactory :: getDbo ();
$ Query = $ db-> getQuery (true);
...............................
for plugin php_event onPreloadData
http://pirgos.resort.name/bg/
1. Athletes names, team (id from table 2) and points - table pirgos2017 field:teams2017 field:sum
2. Name of the team and the sum of the points of the team (from 1 table) - table:teams field:id field:sumteam
Can a good soul write SQL
Which by "id" from table 2 "teams" sums from the 1st table the points of the team of the "sum" field and write them in 2 tables "teams" in the "sumteam" field ?
Something like
$ Db = JFactory :: getDbo ();
$ Query = $ db-> getQuery (true);
...............................
for plugin php_event onPreloadData
http://pirgos.resort.name/bg/