can any one tell me what may be wrong with this script I have written, excerpt following:
[PHP]if($set ="yes"){ $query.="online = 'y'"; }
if($lab !=""){ $query.=" AND Lab= '$lab'"; }
if($parcel !=""){ $query.=" AND Parcel = '$parcel'"; }
if($shape !=""){ $query.=" AND Shape = '$shape'"; }
if($color !=""){ $query.=" AND Color = '$color'"; }
if($clarity !=""){ $query.=" AND Clarity = '$clarity'"; }
if($depth !=""){ $query.=" AND Depth = '$depth'"; }
if($size !=""){ $query.=" AND Size = '$size'"; }
if($polish !=""){ $query.=" AND Polish = '$polish'"; }
if($culet !=""){ $query.=" AND Culet = '$culet'"; }
if($fluorescenc e !=""){ $query.=" AND Fluorescence = '$fluorescence' "; }
if($symmetry !=""){ $query.=" AND Symmetry = '$symmetry'"; }
$query .= " AND Weight BETWEEN '$weight_sm' AND '$weight_big'";
$result = mysql_query("SE LECT * FROM diamonds WHERE $query ORDER BY $orderby LIMIT $startrow, $limit")
or die(mysql_error ());
[/PHP]
Wieght is all that is working for me?
TIA Ben
[PHP]if($set ="yes"){ $query.="online = 'y'"; }
if($lab !=""){ $query.=" AND Lab= '$lab'"; }
if($parcel !=""){ $query.=" AND Parcel = '$parcel'"; }
if($shape !=""){ $query.=" AND Shape = '$shape'"; }
if($color !=""){ $query.=" AND Color = '$color'"; }
if($clarity !=""){ $query.=" AND Clarity = '$clarity'"; }
if($depth !=""){ $query.=" AND Depth = '$depth'"; }
if($size !=""){ $query.=" AND Size = '$size'"; }
if($polish !=""){ $query.=" AND Polish = '$polish'"; }
if($culet !=""){ $query.=" AND Culet = '$culet'"; }
if($fluorescenc e !=""){ $query.=" AND Fluorescence = '$fluorescence' "; }
if($symmetry !=""){ $query.=" AND Symmetry = '$symmetry'"; }
$query .= " AND Weight BETWEEN '$weight_sm' AND '$weight_big'";
$result = mysql_query("SE LECT * FROM diamonds WHERE $query ORDER BY $orderby LIMIT $startrow, $limit")
or die(mysql_error ());
[/PHP]
Wieght is all that is working for me?
TIA Ben
Comment