Skip to content
Snippets Groups Projects
Commit 311d7691 authored by florian.burgener's avatar florian.burgener
Browse files

Update sorting

parent 15fe6241
Branches
No related tags found
No related merge requests found
......@@ -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);
......@@ -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']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment