From 1640a47d912a6304ee0b62e4b9f760543054e8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Fri, 19 Jul 2002 12:21:04 +0000 Subject: [PATCH] Fixed bug #583236 (LIMIT error) --- ChangeLog | 1 + sql.php3 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bff6bb875..fcebcd63a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ $Source$ 2002-07-19 Loïc Chapeaux * pdf_page.php3; libraries/common.lib.php3: PHP3 fixes. * tbl_properties_structure.php3: coding standards. + * sql.php3, line 302: fixed bug 583236 (LIMIT error) 2002-07-18 Alexander M. Turek * libraries/common.lib.php3, libraries/select_lang.lib.php3: Don't include diff --git a/sql.php3 b/sql.php3 index 49c19391a..7ded340cf 100755 --- a/sql.php3 +++ b/sql.php3 @@ -299,7 +299,7 @@ else { && $is_select && !($is_count || $is_export || $is_func || $is_analyse) && eregi('[[:space:]]FROM[[:space:]]', $sql_query) - && !eregi('[[:space:]]LIMIT[[:space:]0-9,]+$', $sql_query)) { + && !eregi('[[:space:]]LIMIT[[:space:]0-9,-]+$', $sql_query)) { $sql_limit_to_append = " LIMIT $pos, ".$cfg['MaxRows']; if (eregi('(.*)([[:space:]](PROCEDURE[[:space:]](.*)|FOR[[:space:]]+UPDATE|LOCK[[:space:]]+IN[[:space:]]+SHARE[[:space:]]+MODE))$', $sql_query, $regs)) { $full_sql_query = $regs[1] . $sql_limit_to_append . $regs[2];