grigri,
I've upgraded my CakePHP core to current beta: rev. 6311 and can
verify that what you suggested works just fine!
AD7six, grigri, thank you both for your help!
On Feb 11, 2:24 pm, grigri <[EMAIL PROTECTED]> wrote:
> What version are you using? I just did a quick test using my
> playground database, and this:
>
> $this->set('test', $this->Tag->find('count', array('conditions' =>
> array('2=2','3=3'),
> 'recursive' => 0, 'fields' => array('(COUNT(DISTINCT Tag.parent_id))
> AS
> count'))));
>
> Generated this SQL:
>
> SELECT (COUNT(DISTINCT Tag.parent_id)) AS count FROM `tags` AS `Tag`
> LEFT JOIN `tags` AS `ParentTag` ON (`Tag`.`parent_id` =
> `ParentTag`.`id`) WHERE 2=2 AND 3=3
>
> As expected, which worked perfectly (rev. 6416).
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---