1
0
dwelling-home/pkg/mindflow/database/sqlite/queries/postGetAll.sql

12 lines
310 B
SQL

SELECT
`post`.`post_id`,
`category`.`category_id` AS `category_id`,
`category`.`name` AS `category`,
`post`.`date`,
`post`.`title`,
`post`.`url`,
`post`.`body`
FROM `post`
LEFT JOIN `category`
ON `post`.`category_id` = `category`.`category_id`
ORDER BY `post`.`date` DESC;