I read manual. And I have model for my controller. My controller's
code is:
$this->Vendor->bindModel(array('hasOne'=>array('Model')));
$fields = array('Vendor.name', 'Vendor.safe', 'COUNT(Model.vendor_id)
AS count');
$conditions = 'GROUP BY Vendor.id';
$order = 'Vendor.name ASC';
$result = $this->Vendor->findAll($conditions, $fields, $order);
And it works, but if I change `count` to `Vendor`.`count`, I get SQL
error #1064
On Jun 7, 12:38 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On 6/6/07, Alexey Kuimov <[EMAIL PROTECTED]> wrote:
>
>
>
> > My PHP version 4.4. How to set model's name?
>
> Have you gone through the manual? Information will be in there that
> should help you.
>
> --
> Chris Hartjes
>
> My motto for 2007: "Just build it, damnit!"
>
> @TheBallpark -http://www.littlehart.net/attheballpark
> @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---