find()で条件指定(order byとwhere)

find()で条件指定(order byとwhere)

CakePHPのfind()でorder byとwhereの使い方が分からなかったので、メモ。

find( 'all', array(
                   'order' => array('Item.itemcode'),
                   'conditions' => array('Item.sellsince >= \'2009-01-01\'')
             ) 
);

order by はorderですが、whereはconditionsを使用するんですね。
初歩的過ぎる。。もっと高度なことできるようになりたい。


andとかorを使う方法は↓を参考にして今度やってみます。
http://asaton.seesaa.net/article/47147443.html