Grouping some information.
Archived from the Xataface Users forum.
vlad — Thu Aug 02, 2007 10:44 am
I would like to sort cities by the first letter grouping them. Something like this:
Cities starting with letter A:
Anchorage , Abu Dhabi
Cities starting with letter B:
Beverly Hills , Bucharest, Brisbane
Cities starting with letter C:
…. and so on.
This list is now based on the browse_by_cat action from librariandb. The problem is that I have over 15000 cities and it’s hard to look for the desired city.
Excuse my english. Thank you.
Vlad
shannah — Fri Aug 03, 2007 12:26 pm
I don’t see a reason why you can’t do this.Ê The browse_by_cat action has the SQL query explicitly inside the PHP for the action.Ê You just need to change the query to produce theÊ results that you want.
e.g . “select ….. where city like ‘A%’” …Ê
And you would probably want to add a little contents to the top to allow you to choose a letter from the alphabet.
-Steve