Zip Codes -


HOME ยป PHP

I've been working with a script that allows users to look up other users in their area based on their zip code. I attempted the script myself but the whole lat/long thing was a bit much for me to understand, so I settled for one that I found on the net. The problem that I'm having is that the query results are loaded into an array such as $zips = $z->get_zips_in_range("".$my_zip."", "".$distance."", _ZIPS_SORT_BY_DISTANCE_ASC, true); and use a foreach loop to iterate through the resutls, ex. foreach ($zips as $key => $value) {} with $key being the zip code and $value being the distance. This works just fine and displays the expected results when echoed, but


Related to : Zip Codes -
Filtering out certain zip codes
PHP

I'm trying to filter out a location for a report I'm running, but it's not filtering. This is my WHERE statement:
AND (ShDt >= @ShippedLoAND ShDt <= @ShippedHi)and (dzp <> '44256'or ozp <> '44256')and lc_scac <> ' '
I put parenthesis around the zips because I thought it had to do with the precedence but don't know what else to try.
Count 5 digit zip codes
PHP

My zip code table contains 5 digit and 9 digit zip codes. I want to make all zip codes 5 digit and count them. Thanks for your help in advance!
Here is what I tried...
SELECT LEFT (vwGenCustInfo.Customer_Zip_Code, 5), vwGenCustInfo.Customer_Zip_Code, Count(vwGenCustInfo.Customer_Zip_Code) AS 'Total'
FROM Database.DBS.vwGenCustApptInfo vwGenCustApptInfo, Database.DBS.vwGenCustInfo vwGenCustInfo
WHERE vwGenCustInfo.Customer_ID = vwGenCustApptInfo.Customer_ID AND ((vwGenCustApptInfo.Appt_Sched_Location_Abbr='OFCHARLE'))
GROUP BY vwGenCustInfo.Customer_City, vwGenCustInfo.Customer_Zip_Code
ORDER BY 'Total' DESC
Here are my results:
COLUM
zip codes !! $ !!
PHP
heys guys never did c before so i'm completely lost to the point where loosing my mind is an understatement.
how would u read zip codes from standard input? :confused:
please help.
distance between zip codes !! $ !!
PHP
Does anyone know how i can determine the distance between zip codes.
So for example, right now i have a list of zip codes that get pulled from a mysql dbase upon the users entry.
I would like to put the distances between each zip code in miles .
Any ideas?
Thanks
Zip Codes -
PHP

I've been working with a script that allows users to look up other users in their area based on their zip code. I attempted the script myself but the whole lat/long thing was a bit much for me to understand, so I settled for one that I found on the net. The problem that I'm having is that the query results are loaded into an array such as $zips = $z->get_zips_in_range("".$my_zip."", "".$distance."", _ZIPS_SORT_BY_DISTANCE_ASC, true); and use a foreach loop to iterate through the resutls, ex. foreach ($zips as $key => $value) {} with $key being the zip code and $value being the distance. This works just fine and displays the expected results when echoed, but

how to call a web api to find the all zip codes within a given radius of a zip code
PHP

i am trying to find the zip codes within given radius using api but getting error to do that please help how to do that.where i am doing wrong. any help will be appreciated. here is my code.

<script type="text/javascript">
    $(document).ready(function () {
        $('#Zip').on('focusout', function () {
            getZipCodes();
        });

        $('#Distance').change(function () {
            getZipCodes();
        });
    });
    function getZipCodes() {
        var Options = "";
        var list = "";
        $.ajax(
            {
                url:
"http://www.zipcodeapi.com/rest/PU0IIBtaJyEq6RcPDCnph3vYXT9PYcFO7FwPhZ01yErEvEu9gRyyU4wSYFHWSmLZ/radius.json/"+$('#Zip').val()+"/"
+ $('#Distance').val() +"/mile",
                dataType: "json",
                type: "GET",
                success: function (response) {
                    for (var i = 0; i < response.results.length;
i++) {
                        //Options += "<option '" +
response.results[i].zip + "'>" + response.results[i].distance +
"</option>";
                        //list.push(response.results[i].zip);
                        list += response.results[i].zip_code + ",";
                    }
                    list = list.substring(0, list.length - 1);
                    $('#ZipList').val(list);
                    console.log(list);
                    //$("#Distance").html(Options);
                },
                error: function () {
                    alert("failure");
                }
            });
    }
</script>


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .