18 lines
442 B
SQL
18 lines
442 B
SQL
SELECT
|
|
`entry`.`entry_id`,
|
|
`entry`.`created`,
|
|
`entry`.`name`,
|
|
`entry`.`message`,
|
|
CASE
|
|
WHEN `entry`.`hide_website` IS FALSE
|
|
THEN `entry`.`website`
|
|
ELSE ''
|
|
END AS `website`,
|
|
`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 ?; |