+
+ ";
+ echo "| ".$team["name"]." | ";
+ foreach($teams_poules2 as $team2){
+ echo "";
+ if($team2 != $team){
+ $found = false;
+ foreach($matchs_poules2 as $match){
if(json_decode($match["teams_id"])[1] == $team["id"] && json_decode($match["teams_id"])[0] == $team2["id"]){
echo json_decode($match["scores"])[1]." - ".json_decode($match["scores"])[0];
$found = true;
diff --git a/sql/data.sql b/sql/data.sql
index c1c8ee2..4b9c18b 100644
--- a/sql/data.sql
+++ b/sql/data.sql
@@ -64,58 +64,58 @@ INSERT INTO teams ("id", "name") VALUES
ALTER SEQUENCE matches_id_seq RESTART;
INSERT INTO matches ("id", "sport_id", "type", "date") VALUES
('1', '6', '0', '2022-10-17T19:10'),
-('2', '6', '0', '2022-10-17T19:19'),
+('2', '6', '7', '2022-10-17T19:19'),
('3', '6', '0', '2022-10-17T19:28'),
-('4', '6', '0', '2022-10-17T19:37'),
+('4', '6', '7', '2022-10-17T19:37'),
('5', '6', '0', '2022-10-17T19:46'),
-('6', '6', '0', '2022-10-17T19:55'),
+('6', '6', '7', '2022-10-17T19:55'),
('7', '6', '0', '2022-10-17T20:04'),
-('8', '6', '0', '2022-10-17T20:13'),
+('8', '6', '7', '2022-10-17T20:13'),
('9', '6', '0', '2022-10-17T20:22'),
-('10', '6', '0', '2022-10-17T20:31'),
+('10', '6', '7', '2022-10-17T20:31'),
('11', '6', '0', '2022-10-17T20:40'),
-('12', '6', '0', '2022-10-17T20:49'),
+('12', '6', '7', '2022-10-17T20:49'),
('13', '6', '0', '2022-10-17T20:58'),
-('14', '6', '0', '2022-10-17T21:07'),
+('14', '6', '7', '2022-10-17T21:07'),
('15', '6', '0', '2022-10-17T21:16'),
-('16', '6', '0', '2022-10-17T21:25'),
+('16', '6', '7', '2022-10-17T21:25'),
('17', '6', '0', '2022-10-17T21:34'),
-('18', '6', '0', '2022-10-17T21:43'),
+('18', '6', '7', '2022-10-17T21:43'),
('19', '6', '0', '2022-10-17T21:52'),
-('20', '6', '0', '2022-10-17T22:01'),
+('20', '6', '7', '2022-10-17T22:01'),
-('21', '1', '0', '2022-10-17T22:15'),
+('21', '1', '7', '2022-10-17T22:15'),
('22', '1', '0', '2022-10-17T22:28'),
-('23', '1', '0', '2022-10-17T22:40'),
+('23', '1', '7', '2022-10-17T22:40'),
('24', '1', '0', '2022-10-17T22:52'),
-('25', '1', '0', '2022-10-18T18:25'),
+('25', '1', '7', '2022-10-18T18:25'),
('26', '1', '0', '2022-10-18T18:36'),
('27', '1', '0', '2022-10-18T18:47'),
('28', '1', '0', '2022-10-18T18:58'),
('29', '1', '0', '2022-10-18T19:09'),
('30', '2', '0', '2022-10-18T19:50'),
-('31', '2', '0', '2022-10-18T20:02'),
+('31', '2', '7', '2022-10-18T20:02'),
('32', '2', '0', '2022-10-18T20:14'),
-('33', '2', '0', '2022-10-18T20:26'),
+('33', '2', '7', '2022-10-18T20:26'),
('34', '2', '0', '2022-10-18T20:38'),
-('35', '2', '0', '2022-10-18T20:50'),
+('35', '2', '7', '2022-10-18T20:50'),
('36', '2', '0', '2022-10-18T21:02'),
('37', '2', '0', '2022-10-18T21:14'),
('38', '2', '0', '2022-10-18T21:26'),
('39', '5', '0', '2022-10-18T22:14'),
-('40', '5', '0', '2022-10-18T22:14'),
+('40', '5', '7', '2022-10-18T22:14'),
('41', '5', '0', '2022-10-18T22:26'),
-('42', '5', '0', '2022-10-18T22:26'),
+('42', '5', '7', '2022-10-18T22:26'),
('43', '5', '0', '2022-10-18T22:38'),
-('44', '5', '0', '2022-10-18T22:38'),
+('44', '5', '7', '2022-10-18T22:38'),
('45', '5', '0', '2022-10-18T22:50'),
-('46', '5', '0', '2022-10-18T22:50'),
+('46', '5', '7', '2022-10-18T22:50'),
('47', '5', '0', '2022-10-18T23:02'),
-('48', '5', '0', '2022-10-18T23:02'),
+('48', '5', '7', '2022-10-18T23:02'),
('49', '5', '0', '2022-10-18T23:14'),
-('50', '5', '0', '2022-10-18T23:14'),
+('50', '5', '7', '2022-10-18T23:14'),
('51', '3', '6', '2022-10-17T18:25'),
('52', '3', '6', '2022-10-17T18:25'),
@@ -129,7 +129,7 @@ INSERT INTO matches ("id", "sport_id", "type", "date") VALUES
-- Populate participations table
ALTER SEQUENCE participations_id_seq RESTART;
INSERT INTO participations ("match_id", "team_id") VALUES
-('1', '2'),
+('1', '3'),
('1', '12'),
('2', '24'),
('2', '28'),
|