Re: [fw-general] How to print a single column ordered/grouped list from db table data?

2010-01-02 Thread Daniel Latter
My solution doesn't include sub articles. On 2 Jan 2010, at 08:16, Enkhbilguun Erdenetsogt wrote: Happy New Year, I would like to print articles list ordered/grouped by year column of my db table, but I can't find how I should loop to print something like the following: 2007 (column

Re: [fw-general] How to print a single column ordered/grouped list from db table data?

2010-01-02 Thread Daniel Latter
Hi, you can accomplish this by adding a GROUP BY clause to your SQL query, then you would use an ORDER clause to have the years ascending or descending. In your case you would group by year. Look at Zend_Db_Select in the manual, here you will find examples. Thanks On 2 Jan 2010, at 08:16,

[fw-general] How to print a single column ordered/grouped list from db table data?

2010-01-02 Thread Enkhbilguun Erdenetsogt
Happy New Year, I would like to print articles list ordered/grouped by year column of my db table, but I can't find how I should loop to print something like the following: * 2007 (column year) o Article 1 (column cat_id) + Sub Article 1 (column name with descriptio