aboutsummaryrefslogtreecommitdiff
path: root/app/models/Entry.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-09-04 02:20:02 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-09-04 02:20:02 +0200
commit040e72fe4f4d6105239dc21d68e97dc8be724dc3 (patch)
treeccf6a3eaac5c53097fc670ab2183401eb7e4af45 /app/models/Entry.php
parentf55ae730e6477f37566722961ca7e7ab9ad7f3c5 (diff)
Work around
In the current SQL request with LIMIT, if many dates are identical, the pagination may not work properly. Added a little more tolerance, but will have to be solved better.
Diffstat (limited to 'app/models/Entry.php')
-rwxr-xr-xapp/models/Entry.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php
index 53f09b9c9..a763feca0 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -396,7 +396,7 @@ class EntryDAO extends Model_pdo {
. ' ORDER BY date' . $order . ', id' . $order;
if (!empty($limitCount)) {
- $sql .= ' LIMIT ' . ($limitCount + 1); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
+ $sql .= ' LIMIT ' . ($limitCount + 2); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
}
$stm = $this->bd->prepare ($sql);