Skip to content

Instantly share code, notes, and snippets.

@gotoplanb
Created February 15, 2013 03:28
Show Gist options
  • Save gotoplanb/4958370 to your computer and use it in GitHub Desktop.
Save gotoplanb/4958370 to your computer and use it in GitHub Desktop.
$query = "SELECT * FROM $table WHERE (($varsqft >= $minsquarefeet && $varsqft <= $maxsquarefeet && $varyear >= $minyearbuilt && $varyear <= $maxyearbuilt && $varbed >= $minbedrooms AND $varbed <= $maxbedrooms AND $varbath >= $minbathrooms) OR ($search_vacant_proptype_string AND $minbedrooms=0 AND $minbathrooms=0)) AND $varprice >= $pricelow AND $varprice <= $pricehigh $search_hotnew_string $search_openhouse_string $search_justreduced_string $search_pool_string $search_sprinklersystem_string $search_keywords_string $search_garage_string $search_parking_string $search_area_string $search_proptype_string $search_offices_string $citysearch $search_waterfront_string $subdivisionsearch $mlsname_search ORDER BY $sortorder LIMIT $startrow, 10";
$countquery = "SELECT count(*) FROM $table WHERE (($varsqft >= $minsquarefeet && $varsqft <= $maxsquarefeet && $varyear >= $minyearbuilt && $varyear <= $maxyearbuilt && $varbed >= $minbedrooms AND $varbed <= $maxbedrooms AND $varbath >= $minbathrooms) OR ($search_vacant_proptype_string AND $minbedrooms=0 AND $minbathrooms=0)) AND $varprice >= $pricelow AND $varprice <= $pricehigh $search_hotnew_string $search_openhouse_string $search_justreduced_string $search_pool_string $search_sprinklersystem_string $search_keywords_string $search_garage_string $search_parking_string $search_area_string $search_proptype_string $search_offices_string $citysearch $search_waterfront_string $subdivisionsearch $mlsname_search";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment