Fixed a warning because '$sql_order' variable was not set

This commit is contained in:
Loïc Chapeaux
2001-05-10 17:11:53 +00:00
parent 55c0029204
commit 3d51baee53

View File

@@ -59,9 +59,11 @@ else {
$sql_query = isset($sql_query) ? stripslashes($sql_query) : '';
$sql_order = isset($sql_order) ? stripslashes($sql_order) : '';
}
if(isset($sessionMaxRows) )
if(isset($sessionMaxRows))
$cfgMaxRows = $sessionMaxRows;
$sql_limit = (isset($pos) && eregi("^SELECT", $sql_query) && !eregi("LIMIT[ 0-9,]+$", $sql_query)) ? " LIMIT $pos, $cfgMaxRows" : '';
if (!isset($sql_order))
$sql_order = '';
$result = mysql_db_query($db, $sql_query.$sql_order.$sql_limit);
// the same SELECT without LIMIT
if(eregi("^SELECT", $sql_query))