Fixed bug #583236 (LIMIT error)
This commit is contained in:
@@ -8,6 +8,7 @@ $Source$
|
||||
2002-07-19 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* 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 <rabus@users.sourceforge.net>
|
||||
* libraries/common.lib.php3, libraries/select_lang.lib.php3: Don't include
|
||||
|
2
sql.php3
2
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];
|
||||
|
Reference in New Issue
Block a user