I posted this question earlier that might should be put into
consideration as well:
http://www.nabble.com/Zend_Db_Table-and-sorting-by-lookup-key-t4807160s16154.htmlCurrently I am having some issues sorting my tables without doing
joins if the sorting is base on a lookup ID. If you cache the the
objects without doing a full join, you can't sort (unless I am missing
something). E.g. consider the following SQL:
SELECT c.* FROM customers c, cities ci WHERE c.city_id = ci.city_id
ORDER BY ci.name DESC;
I haven't found a way on how to sort that without doing the join. For
one of my listing view generators I am creating a helper class that
selects all cities once and stores them in an associative array. The
listing then just pulls the city name out of the array to display in
the listing. All cities are selected only once with a simple SQL:
SELECT city_id, city_name FROM cities and then reused for the whole
listing.
But now I would like to implement sortable headers and for that I
can't sort on the ID. I can't think of anything else than doing a join
to be able to sort. Or?
Any thoughts?
Gunter