Afser Posted May 15, 2007 Share Posted May 15, 2007 Hello, how to Sort the Results in PHP mysql .. <?php include_once("include/conn.php"); include_once("include/functions.php"); if(isset($_POST['search'])) { $search_query=""; $val = "0"; if($_POST['property_type']!='select')// && $_POST['country']!='select' && !empty($_POST['ind_type'])) { if(!empty($search_query)) $search_query .= " AND property_type='$property_type'"; else $search_query = " property_type='$property_type'";// AND country='$country' AND industry_type like '%$ind_type'"; } if($_POST['region']!='select') { if(!empty($search_query)) $search_query .= " AND region='$region'"; else $search_query = " region='$region'"; } if($_POST['pax']!='select') { if(!empty($search_query)) $search_query .= " AND pax >='".$_POST['pax']."'";// AND beds='$keyword' ; else $search_query = " pax >='".$_POST['pax']."'"; } if($_POST['swimming_pool']!='select') { if(!empty($search_query)) $search_query .= " AND swimming_pool='$swimming_pool'"; else $search_query = " swimming_pool='$swimming_pool'"; } if($_POST['keyword']!='') { if(!empty($search_query)) $search_query .= " AND Beds='$keyword'"; else $search_query = " Beds='$keyword'"; } if($search_query!="") $search_query = " Where ".$search_query; } ?> and how i can get relvant results of pax there.. not the extact value.. and how i can get the result in Ascending order of PAX. Link to comment https://forums.phpfreaks.com/topic/51452-how-to-sort-the-results-from-php-mysql/ Share on other sites More sharing options...
Barand Posted May 15, 2007 Share Posted May 15, 2007 SELECT ... FROM ... WHERE ... ORDER BY PAX Link to comment https://forums.phpfreaks.com/topic/51452-how-to-sort-the-results-from-php-mysql/#findComment-253397 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.