zen of coding

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 one shot… We need to get a list of all companies, where: Company.name is either ‘Future Holdings’ OR ‘Steel Mega Works’ AND we need to ensure that Company.status is either[…]

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 ————– How about a little trick to extend the find(‘list’) functionality?.. Let’s say we need to display a list of users, but instead of just User.id and User.name we need to[…]

Read More »
%d bloggers like this: