Changeset 9984 for trunk/templates/base/scripts/BxBaseProfileView.php
- Timestamp:
- 04/06/09 22:50:09 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/templates/base/scripts/BxBaseProfileView.php
r9977 r9984 722 722 723 723 $zip = process_db_input( strtoupper( str_replace(' ', '', $zip) ), 1); 724 $aZipInfo = db_arr("SELECT `Latitude`, `Longitude` FROM ` ZIPCodes` WHERE REPLACE(`ZIPCode`,' ','') = '{$sZip}'");724 $aZipInfo = db_arr("SELECT `Latitude`, `Longitude` FROM `sys_zip_codes` WHERE REPLACE(`ZIPCode`,' ','') = '{$sZip}'"); 725 725 //echoDbg($aZipInfo); 726 726 if ( $aZipInfo ) { … … 739 739 $maxLong = $zcdRadius->MaxLongitude(); 740 740 741 $sJoin .= " LEFT JOIN ` ZIPCodes` ON UPPER( REPLACE(`Profiles`.`zip`, ' ', '') ) = REPLACE(`ZIPCodes`.`ZIPCode`,' ', '') ";742 $aWhere[] = "` ZIPCodes`.`ZIPCode` IS NOT NULL AND `ZIPCodes`.`Latitude` >= {$minLat} AND `ZIPCodes`.`Latitude` <= {$maxLat} AND `ZIPCodes`.`Longitude` >= {$minLong} AND `ZIPCodes`.`Longitude` <= {$maxLong} ";741 $sJoin .= " LEFT JOIN `sys_zip_codes` ON UPPER( REPLACE(`Profiles`.`zip`, ' ', '') ) = REPLACE(`sys_zip_codes`.`ZIPCode`,' ', '') "; 742 $aWhere[] = "`sys_zip_codes`.`ZIPCode` IS NOT NULL AND `sys_zip_codes`.`Latitude` >= {$minLat} AND `sys_zip_codes`.`Latitude` <= {$maxLat} AND `sys_zip_codes`.`Longitude` >= {$minLong} AND `sys_zip_codes`.`Longitude` <= {$maxLong} "; 743 743 } 744 744 }
Note: See TracChangeset
for help on using the changeset viewer.