[font "Times New Roman"]1.[/#000000] Yes, those are being pulled separately. One premium section uses the following:
$wherepre = "pre_listing = '1' AND category LIKE '%\tDay Trips\t%'"; if (@$_REQUEST['alpha']) {
$wherepre .= " AND title LIKE '".mysql_escape(@$_REQUEST['alpha'])."%'";
}
list($premium_listRecords, $premium_listMetaData) = getRecords(array(
'tableName' => 'dir_listings',
'where' => $wherepre,
'perPage' => '25',
'orderBy' => 'title',
));
And the regular listings use:
$where = "pre_listing = '0' AND category LIKE '%\tDay Trips\t%'"; if (@$_REQUEST['alpha']) {
$where .= " AND title LIKE '".mysql_escape(@$_REQUEST['alpha'])."%'";
}
list($dir_listingsRecords, $dir_listingsMetaData) = getRecords(array(
'tableName' => 'dir_listings',
'where' => $where,
'perPage' => '25',
'orderBy' => 'title',
));
So, I was wondering if and how I can update the geocoder section to reflect both sections since both sections are pulling from same table so the premium area will not pull a error on miles.
// get records
$addressRecords = array();
if ($myLat && $myLng) {
$maxDist = floatval(@$_REQUEST['maxDistance']);
list($dir_listingsRecords, $dir_listingsMetaData) = getRecords(array(
'tableName' => 'dir_listings',
'addSelectExpr' => geocoder_getSelectExprForDistance($myLat, $myLng, '_distance', $kmOrMiles), // adds '_distance' field to output records
'where' => geocoder_getWhereForDistanceWithin($myLat, $myLng, $maxDist, $kmOrMiles), // optimization: remove results outside of minimum bounding rectangle
'having' => "_distance <= " . $maxDist, // only show results within max distance
'orderBy' => 'ISNULL(_distance), _distance', // sort nearest records first -and- unknown or undefined distances last
));
}
My other issues are:
2. On the search, the program type is filtering correctly but is showing a dropdown for all categories (I only have 2 set up in this test...day trips and party). On this page, should only show program type dropdown (that has arts, dance etc)
3. When you complete a search, my meta (Showing <?php echo $dir_listingsMetaData['pageResultsStart'];?> - <?php echo $dir_listingsMetaData['pageResultsEnd'];?> of <?php echo $dir_listingsMetaData['totalRecords'];?>) is not showing the correct results.