Hi
I'm trying to write a query which when 0 is selected it brings back all the district_zones otherwise it just brings back the selected zone.
It brings back the selected zone fine, but not all records which are not 0
I know it is my wildcard that is the problem - but I dont'know what to use.
Any help would be great.
Many thanks
if ($_POST[district_zone] == "0") { $receivezone = "%"; } else {$receivezone = $_POST[district_zone];}
$query_rs_district = "SELECT property_districts.district_zone, property_districts.district_name FROM property_districts WHERE property_districts.district_zone = '$receivezone' ";