mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-06 11:46:24 -07:00
Prevent error when scanning filename if filename is NULL
This commit is contained in:
parent
9ae29a93cf
commit
af4572ea5c
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ func getRecentPosts() ([]recentPost, error) {
|
|||
query := `SELECT
|
||||
DBPREFIXposts.id, DBPREFIXposts.message_raw,
|
||||
(SELECT dir FROM DBPREFIXboards WHERE id = t.board_id),
|
||||
f.filename, op.id
|
||||
COALESCE(f.filename, ''), op.id
|
||||
FROM DBPREFIXposts
|
||||
LEFT JOIN (SELECT id, board_id FROM DBPREFIXthreads) t ON t.id = DBPREFIXposts.thread_id
|
||||
LEFT JOIN (SELECT post_id, filename FROM DBPREFIXfiles) f on f.post_id = DBPREFIXposts.id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue