Friday, October 7, 2011

Re: Using Set library to build custom array

Missclicked publish when writing ¬¬

The point is get the desired array without looping through the entire first array.

Maybe is possible to begin with a better formatted array, i'm using this find to get it:
           
            $articles = $this->Article->find('all', array(
                'fields' => array(
                    'YEAR(Article.publish_date) as year',
                    'MONTH(Article.publish_date) as month'),
                'order' => array('year DESC, month DESC'))
            );

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: