diff --git a/lib/dao/dao.class.php b/lib/dao/dao.class.php index a75b11f8a2..bcae2cb6e9 100755 --- a/lib/dao/dao.class.php +++ b/lib/dao/dao.class.php @@ -486,7 +486,7 @@ class dao /* Remove the part after order and limit. */ $subLength = strlen($sql); - $orderPOS = strripos($sql, 'order'); + $orderPOS = strripos($sql, 'order '); $limitPOS = strripos($sql , 'limit'); if($limitPOS) $subLength = $limitPOS; if($orderPOS) $subLength = $orderPOS;