From 311d7691bfdfd2f68f95a8c7cf0807890ff4fd29 Mon Sep 17 00:00:00 2001 From: Florian Burgener <florian.burgener@etu.hesge.ch> Date: Wed, 4 Oct 2023 14:18:11 +0200 Subject: [PATCH] Update sorting --- src/backend/public/GET-educations.php | 2 +- src/backend/public/GET-experiences.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/public/GET-educations.php b/src/backend/public/GET-educations.php index 7ebe4eb..d136304 100644 --- a/src/backend/public/GET-educations.php +++ b/src/backend/public/GET-educations.php @@ -6,5 +6,5 @@ use App\DB; header('Access-Control-Allow-Origin: *'); header('Content-Type: application/json; charset=utf-8'); -$data = DB::run("SELECT * FROM educations ORDER BY endDate DESC"); +$data = DB::run("SELECT * FROM educations ORDER BY startDate DESC"); echo json_encode($data); diff --git a/src/backend/public/GET-experiences.php b/src/backend/public/GET-experiences.php index e8fcba3..74f0710 100644 --- a/src/backend/public/GET-experiences.php +++ b/src/backend/public/GET-experiences.php @@ -6,7 +6,7 @@ use App\DB; header('Access-Control-Allow-Origin: *'); header('Content-Type: application/json; charset=utf-8'); -$data = DB::run("SELECT * FROM experiences ORDER BY endDate DESC"); +$data = DB::run("SELECT * FROM experiences ORDER BY startDate DESC"); for ($i = 0; $i < count($data); $i++) { $data[$i]['tasks'] = DB::run('SELECT * FROM tasks WHERE experience_id = ?', $data[$i]['id']); -- GitLab