From 328484bee7cab9ce354121413cc8d96c3e227aea Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Wed, 31 Jul 2013 20:51:43 -0400 Subject: SQL cleanup --- templates/themes/catalog/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/themes/catalog/theme.php') diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index e585cf17..5c9f6769 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -39,7 +39,7 @@ $query = query(sprintf("SELECT *, `id` AS `thread_id`, (SELECT COUNT(*) FROM `posts_%s` WHERE `thread` = `thread_id`) AS `reply_count`, '%s' AS `board` FROM `posts_%s` WHERE `thread` IS NULL ORDER BY `bump` DESC", $board_name, $board_name, $board_name)) or error(db_error()); - while ($post = $query->fetch()) { + while ($post = $query->fetch(PDO::FETCH_ASSOC)) { $post['link'] = $config['root'] . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], ($post['thread'] ? $post['thread'] : $post['id'])); $post['board_name'] = $board['name']; $post['file'] = $config['uri_thumb'] . $post['thumb']; -- cgit v1.3