Fixed a warning because '$sql_order' variable was not set
This commit is contained in:
4
sql.php3
4
sql.php3
@@ -59,9 +59,11 @@ else {
|
|||||||
$sql_query = isset($sql_query) ? stripslashes($sql_query) : '';
|
$sql_query = isset($sql_query) ? stripslashes($sql_query) : '';
|
||||||
$sql_order = isset($sql_order) ? stripslashes($sql_order) : '';
|
$sql_order = isset($sql_order) ? stripslashes($sql_order) : '';
|
||||||
}
|
}
|
||||||
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" : '';
|
||||||
|
if (!isset($sql_order))
|
||||||
|
$sql_order = '';
|
||||||
$result = mysql_db_query($db, $sql_query.$sql_order.$sql_limit);
|
$result = mysql_db_query($db, $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))
|
||||||
|
Reference in New Issue
Block a user