Page 1 of 1

PostPosted: Thu Aug 02, 2007 10:44 am
by vlad
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

PostPosted: Fri Aug 03, 2007 12:26 pm
by shannah

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