2022-10-19 03:25:43 +04:00
|
|
|
SELECT
|
|
|
|
`entry`.`entry_id`,
|
|
|
|
`entry`.`created`,
|
|
|
|
`entry`.`name`,
|
2022-10-21 04:20:53 +04:00
|
|
|
`entry`.`message`,
|
2023-05-06 22:22:40 +04:00
|
|
|
CASE
|
2022-10-19 03:25:43 +04:00
|
|
|
WHEN `entry`.`hide_website` IS FALSE
|
|
|
|
THEN `entry`.`website`
|
|
|
|
ELSE ''
|
2023-05-06 22:22:40 +04:00
|
|
|
END AS `website`,
|
2022-10-19 03:25:43 +04:00
|
|
|
`reply`.`created` AS `reply_created`,
|
|
|
|
`reply`.`message` AS `reply_message`
|
|
|
|
FROM `entry`
|
|
|
|
LEFT JOIN `reply`
|
|
|
|
ON `entry`.`entry_id` = `reply`.`entry_id`
|
|
|
|
ORDER BY `entry`.`entry_id` DESC
|
|
|
|
LIMIT ?
|
|
|
|
OFFSET ?;
|