simple "SELECT" statements like "SELECT 1+1" were failing because they were added a "LIMIT" clause

This commit is contained in:
Loïc Chapeaux
2001-09-10 21:44:35 +00:00
parent 2a9f5ea8b7
commit 1d85bbf212

View File

@@ -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)) {