diff --git a/pkg/mindflow/database/sqlite/queries/postGetAll.sql b/pkg/mindflow/database/sqlite/queries/postGetAll.sql index 5616c2e..3662b10 100644 --- a/pkg/mindflow/database/sqlite/queries/postGetAll.sql +++ b/pkg/mindflow/database/sqlite/queries/postGetAll.sql @@ -1,10 +1,11 @@ SELECT `post`.`post_id`, - `category`.`id` AS `category_id`, + `category`.`category_id` AS `category_id`, `category`.`name` AS `category`, - `post`.`date`, + UNIXEPOCH(`post`.`date`), `post`.`title`, `post`.`body` FROM `post` LEFT JOIN `category` - ON `post`.`post_id` = `category`.`category_id`; \ No newline at end of file + ON `post`.`category_id` = `category`.`category_id` + ORDER BY `post`.`date` DESC; \ No newline at end of file