From 1d85bbf2120f29a3dee7cc5c7b66f90a5a0f0d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Mon, 10 Sep 2001 21:44:35 +0000 Subject: [PATCH] simple "SELECT" statements like "SELECT 1+1" were failing because they were added a "LIMIT" clause --- sql.php3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql.php3 b/sql.php3 index ee90cb6e4..28d829298 100755 --- a/sql.php3 +++ b/sql.php3 @@ -174,7 +174,7 @@ else { // Do append a "LIMIT" clause? if (isset($pos) - && ($is_select && !$is_count) + && ($is_select && !$is_count && eregi(' FROM ', $sql_query)) && !eregi(' LIMIT[ 0-9,]+$', $sql_query)) { $sql_limit_to_append = " LIMIT $pos, $cfgMaxRows"; if (eregi('(.*)( PROCEDURE (.*)| FOR UPDATE| LOCK IN SHARE MODE)$', $sql_query, $regs)) {