hello,

paginating is working perfectly but i would like to order the results
of a search based on what the user inputs (a string).

for example, i have a search field (input text) where a user can input
a city name, my controller then looks up long/lat for the city,
searches for other cities within a radius, and spits out an array of
all the cities that are inside the radius.

i then compare the list of cities to the cities i have saved in
another table that holds actual listings of apartments. if any of the
cities inside the list of cities array matches any of my listings of
apartments, then of course, the apartment is listed.

i would like to order the results starting with the name the user has
inputted. so for example, if someone search for Miami with a radius of
100km, maybe there will be a city that starts with an A that is 2km
away from Miami. and maybe there is a town that starts with a T that
is also close to Miami. Now you can see the problem that whichever way
I order it (ASC or DESC by city), then Miami won't be the first
result. This behaviour would be weird for a search engine. So is it
possible to tell the paginator to start order from a specific string
sequence?

How could I solve this?

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to