我想生成像 day=>title 这样的列表:
$news = $this->News->find('list', array(
'conditions' => array(
'News.created LIKE' => '2008-09%'),
'fields' => array(
'DAY(News.created) AS day',
'News.name'),
'recursive' => -1));
...但是不起作用,为什么?
函数 SUBSTR/SUBSTRING 也...
当我将 find 与 'all' 属性一起使用时,DAY 函数运行良好!