Actually found a solution.

Just trying to get a list of special offers for some products.

function get_special_products($id = null) {
   $conditions = '(Product.category_id IN (SELECT id as category_id
FROM categories WHERE parent_id = '.$id.') OR Product.category_id = '.
$id.') AND Product.special = 1';
   $data = $this->Product->findAll($conditions,$this-
>fields,'RAND()');
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to