I am trying to make a Archives (by month) section in a blog. How can I format a date for use in a query? Example so far:
$cmonth = "date_format(Post.created, 'F')"; $data = $Post->query('SELECT DISTINCT `' .$cmonth. '` FROM posts'); I was trying to Select Distinct by Month but this only outputs $cmonth as a string. Is there an easier, better or more standard way? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---