15 lines
397 B
SQL
15 lines
397 B
SQL
SELECT
|
|
`entry`.`entry_id`,
|
|
`entry`.`created`,
|
|
`entry`.`name`,
|
|
`entry`.`message`,
|
|
`entry`.`website`,
|
|
`entry`.`hide_website`,
|
|
COALESCE(`reply`.`created`, 0) AS `reply_created`,
|
|
COALESCE(`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 ?; |