zen of coding

find(‘first’)… gotcha

Just a simple tip… Here’s a typical find() example: [cc lang=”php”] $this->Post->find(‘first’, array(‘condition’ => array(‘id’ => 5))); [/cc] Why does it return me the post with ID = 1, rather than ID = 5? Of course, a careful reader spotted the spelling issue in the key: ‘condition’ instead of ‘conditions’.[…]

Read More »
%d bloggers like this: