fix sql error in ukko when using db prefix. thank you based bush
This commit is contained in:
parent
f5657caf24
commit
37fe209290
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user