From 2b68ddaff0f05c8351ea677d2993e4bac319ae17 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sun, 11 Sep 2011 14:23:21 +1000 Subject: [PATCH] Don't order by time() --- inc/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index 951a69a8..a5c8a518 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1367,7 +1367,7 @@ $memcached->delete("threadindex_{$board['uri']}_{$id}"); } - $query = prepare(sprintf("SELECT * FROM `posts_%s` WHERE (`thread` IS NULL AND `id` = :id) OR `thread` = :id ORDER BY `thread`,`time`", $board['uri'])); + $query = prepare(sprintf("SELECT * FROM `posts_%s` WHERE (`thread` IS NULL AND `id` = :id) OR `thread` = :id ORDER BY `thread`,`id`", $board['uri'])); $query->bindValue(':id', $id, PDO::PARAM_INT); $query->execute() or error(db_error($query));