bug 444749

This commit is contained in:
Marc Delisle
2001-08-07 00:29:51 +00:00
parent f32311b9f0
commit 83500fcddc
2 changed files with 5 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ $Source$
* tbl_change.php3, bug 442778, Edit record with two similar SET fields
* tbl_replace.php3, could not save a row with a set which has no
value selected
* sql.php3, bug 444749 SQL DATE & TIME FUNCTION ERROR
2001-08-06 Steve Alberty <alberty@nepunlabs.de>
* index.php3: remove warning under Apache 2.0.23-dev

View File

@@ -114,7 +114,10 @@ else {
if (isset($sessionMaxRows)) {
$cfgMaxRows = $sessionMaxRows;
}
$sql_limit_to_append = (isset($pos) && $is_select && !eregi(' LIMIT[ 0-9,]+$', $sql_query))
$sql_limit_to_append = (isset($pos)
&& $is_select
&& !eregi(' LIMIT[ 0-9,]+$', $sql_query)
&& eregi(' FROM ', $sql_query))
? " LIMIT $pos, $cfgMaxRows"
: '';
$full_sql_query = $sql_query . $sql_order . $sql_limit_to_append;