hybmg57 Posted July 8, 2010 Share Posted July 8, 2010 Is there anything wrong with below code? It was working fine 2 hours ago but after a few changes it's not retrieving data anymore it's just giving the entire data without filtering... Any ideas??? $result = mysql_query("SELECT * FROM residential WHERE PROPSUBTYPEDISPLAY LIKE '%{$Property_Type}%' AND AREA {$Any_City} {$City} AND BEDS >={$Beds} AND BATHSTOTAL >={$Baths} AND LISTPRICE >={$Lowest_Price} AND LISTPRICE {$Any} {$Highest_Price} AND CITY LIKE '%{$CityA}%' AND STREETNAME LIKE '%{$AddressA}%' AND ZIPCODE {$Any_Zip} '{$Zip_codeA}' AND SUBDIVISION LIKE '%{$SubdivisionA}%' AND GARAGECAP >= {$GarageA} AND STORIES >= {$StoriesA} AND FIREPLACES >= {$FireplacesA} AND LOTSIZE {$Yard} AND SCHOOLDISTRICT LIKE '%{$School_districtA}%' AND SCHOOLNAME1 LIKE '%{$School_nameA}%' AND SCHOOLNAME2 LIKE '%{$School_nameA}%' AND SCHOOLNAME3 LIKE '%{$School_nameA}%' AND SCHOOLTYPE1 {$E} AND SCHOOLTYPE2 {$M} AND SCHOOLTYPE3 {$H} AND EXTERIOR {$Guest_quartersA} AND HOUSINGTYPE {$High_riseA} AND INTERIOR {$Loft_A} AND EXTERIOR {$BalconyA} AND ROOMOTHER {$LibraryA} AND ROOMOTHER {$MediaA} AND COMMONFEATURES {$Gated_communityA} AND COMMONFEATURES {$Golf_course_communityA} AND COMMONFEATURES {$Golf_course_lotA} AND COMMONFEATURES {$Lake_front_lotA} AND COMMONFEATURES {$Lake_viewA} {$CitiesA0} {$CitiesA1} {$CitiesA2} {$CitiesA3} {$CitiesA4} {$CitiesA5} {$CitiesA6} {$CitiesA7} {$CitiesA8} {$CitiesA9} {$CitiesA10} {$AreasA0} {$AreasA1} {$AreasA2} {$AreasA3} {$AreasA4} {$AreasA5} {$AreasA6} {$AreasA7} {$AreasA8} {$AreasA9} {$AreasA10} {$CountiesA0} {$CountiesA1} {$CountiesA2} {$CountiesA3} {$CountiesA4} {$CountiesA5} {$CountiesA6} {$CountiesA7} {$CountiesA8} {$CountiesA9} {$CountiesA10} AND PHOTOCOUNT {$Properties_with_photosA} ORDER BY {$sort} LIMIT {$offset}, {$limit}") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/207133-quick-help/ Share on other sites More sharing options...
fenway Posted July 8, 2010 Share Posted July 8, 2010 That's php code, not a mysql query. Echo the actual query. Link to comment https://forums.phpfreaks.com/topic/207133-quick-help/#findComment-1083078 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.