simple "SELECT" statements like "SELECT 1+1" were failing because they were added a "LIMIT" clause
This commit is contained in:
2
sql.php3
2
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)) {
|
||||
|
Reference in New Issue
Block a user