diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 22:14:26 -0400 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-07-31 22:14:26 -0400 |
| commit | a052a791b553c770ef407f91b697bef7a62df5b1 (patch) | |
| tree | f49b8edf930f6d27fd14db4970107f128b02b992 /templates/themes/sitemap/theme.php | |
| parent | 232f4ff8680e81dbee3902c01af6c702555fbc0f (diff) | |
Add optional database table prefix (issue #118; see issue comments for details)
Diffstat (limited to 'templates/themes/sitemap/theme.php')
| -rw-r--r-- | templates/themes/sitemap/theme.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/themes/sitemap/theme.php b/templates/themes/sitemap/theme.php index e210316b..226f8357 100644 --- a/templates/themes/sitemap/theme.php +++ b/templates/themes/sitemap/theme.php @@ -19,7 +19,7 @@ $threads = array(); foreach ($boards as $board) { - $query = query(sprintf("SELECT `id` AS `thread_id`, (SELECT `time` FROM `posts_%s` WHERE `thread` = `thread_id` OR `id` = `thread_id` ORDER BY `time` DESC LIMIT 1) AS `lastmod` FROM `posts_%s` WHERE `thread` IS NULL", $board, $board)) or error(db_error()); + $query = query(sprintf("SELECT `id` AS `thread_id`, (SELECT `time` FROM ``posts_%s`` WHERE `thread` = `thread_id` OR `id` = `thread_id` ORDER BY `time` DESC LIMIT 1) AS `lastmod` FROM ``posts_%s`` WHERE `thread` IS NULL", $board, $board)) or error(db_error()); $threads[$board] = $query->fetchAll(PDO::FETCH_ASSOC); } |
