small glitch

This commit is contained in:
Marc Delisle
2001-05-28 19:21:57 +00:00
parent a2396305cc
commit 71abf95318

View File

@@ -66,6 +66,7 @@ else {
if(isset($sessionMaxRows)) if(isset($sessionMaxRows))
$cfgMaxRows = $sessionMaxRows; $cfgMaxRows = $sessionMaxRows;
$sql_limit = (isset($pos) && eregi("^SELECT", $sql_query) && !eregi("LIMIT[ 0-9,]+$", $sql_query)) ? " LIMIT $pos, $cfgMaxRows" : ''; $sql_limit = (isset($pos) && eregi("^SELECT", $sql_query) && !eregi("LIMIT[ 0-9,]+$", $sql_query)) ? " LIMIT $pos, $cfgMaxRows" : '';
mysql_select_db($db);
$result = mysql_query($sql_query.$sql_order.$sql_limit); $result = mysql_query($sql_query.$sql_order.$sql_limit);
// the same SELECT without LIMIT // the same SELECT without LIMIT
if(eregi("^SELECT", $sql_query)) if(eregi("^SELECT", $sql_query))
@@ -78,6 +79,7 @@ else {
if(!$result) if(!$result)
{ {
echo "t12";
$error = mysql_error(); $error = mysql_error();
include("./header.inc.php3"); include("./header.inc.php3");
mysql_die($error); mysql_die($error);