1
0
Fork 0

Fixed GetAll query.

This commit is contained in:
Alexander Andreev 2023-05-20 06:26:52 +04:00
parent a0995a0e97
commit 97b4887bc2
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 4 additions and 3 deletions

View File

@ -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`;
ON `post`.`category_id` = `category`.`category_id`
ORDER BY `post`.`date` DESC;