Welcome Guest, Not a member yet? Register   Sign In
Logic problem filtering results using datamapper
#2

[eluser]WanWizard[/eluser]
First a general remark:

Most of the code in search() and in your view should be in your model. This logic does not belong in your controller or view. It should be of no concern to both how you get to the list of adresses.

As to the selection:

If your geozip library can produce an array of zipcodes in a specific radius, you can use a where_in('postcode', $array_of_postcodes) to select only record whose postcode is in the list of zipcodes within radius.


Messages In This Thread
Logic problem filtering results using datamapper - by El Forum - 01-19-2012, 10:08 AM
Logic problem filtering results using datamapper - by El Forum - 01-19-2012, 10:57 AM
Logic problem filtering results using datamapper - by El Forum - 01-19-2012, 11:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB