Commit 0116f090 authored by Ziwen Su's avatar Ziwen Su

Optimized judgment statement.

parent b2b0e9d7
......@@ -52,10 +52,10 @@
if ( sizeof($items) == 3 ) {
$attribute_key1 = ":fp1_".$items[0];
$attribute_key2 = ":fp2_".$items[0];
if ( !is_numeric($items[2]) || $items[2] == 0 ){
if ( !is_numeric($items[2]) ){
$sql .= "AND ".$column_name." >= ".$attribute_key1." ";
$attributes[$attribute_key1] = $items[1];
} elseif ( !is_numeric($items[1]) || $items[1] == 0 ){
} elseif ( !is_numeric($items[1]) ){
$sql .= "AND ".$column_name." <= ".$attribute_key2." ";
$attributes[$attribute_key2] = $items[2];
} else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment