diff options
| author | czaks <marcin@6irc.net> | 2013-12-22 20:18:10 +0100 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-12-22 20:18:10 +0100 |
| commit | 37fe2092906a537710730ba27b121c07246561d6 (patch) | |
| tree | 0a845fff6a956f333b61d9c4f46615c37ced40fe /templates/themes | |
| parent | f5657caf24753ed7c25d56659ae8dfe79d48b99a (diff) | |
fix sql error in ukko when using db prefix. thank you based bush
Diffstat (limited to 'templates/themes')
| -rw-r--r-- | templates/themes/ukko/theme.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php index c60d029a..1ca00014 100644 --- a/templates/themes/ukko/theme.php +++ b/templates/themes/ukko/theme.php @@ -58,7 +58,7 @@ } if ($posts->rowCount() == ($post['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview'])) { - $ct = prepare(sprintf("SELECT COUNT(`id`) as `num` FROM ``posts_%s`` WHERE `thread` = :thread UNION ALL SELECT COUNT(`id`) FROM `posts_%s` WHERE `file` IS NOT NULL AND `thread` = :thread", $post['board'], $post['board'])); + $ct = prepare(sprintf("SELECT COUNT(`id`) as `num` FROM ``posts_%s`` WHERE `thread` = :thread UNION ALL SELECT COUNT(`id`) FROM ``posts_%s`` WHERE `file` IS NOT NULL AND `thread` = :thread", $post['board'], $post['board'])); $ct->bindValue(':thread', $post['id'], PDO::PARAM_INT); $ct->execute() or error(db_error($count)); |
