find(‘first’)… gotcha

Just a simple tip… Here’s a typical find() example: $this->Post->find(’first’, array(’condition’ => array(’id’ => 5))); Why does it return me

Read more

Example of many nested conditions in CakePHP's find()

Just a quick example on how you can use deep, complex find conditions with OR, AND and NOT arrays in

Read more

find(‘list’) with three (or combined) fields

Update 01/07/2010: Good news everyone, for those switching over to cake 1.3, there is a great new feature: http://book.cakephp.org/view/1608/Virtual-fields ————–

Read more

'fields', 'conditions' and associated models in CakePHP 1.2

Sometimes you see code that tries to do something like this: $this->Company->find(’all’, array(’conditions’ =>array(’Profile.name’=>’test’),            

Read more

read() vs find()

What exactly is the differednce between $this->User->read() and $this->User->find()? Seemingly, they both retrieve the data (and possibly associated data) for

Read more

I need the first record from my table…

Let’s say you need to know when was the very first user record created. Add a method like this to

Read more
%d bloggers like this: