Ok, I understand you. All problems was in SQL syntax. But I need to
get result in a single array. Now count values are in additional array
[0]. If I'll create separate query for count, how to sort my result?

On Jun 7, 7:17 pm, MJ Ray <[EMAIL PROTECTED]> wrote:
> Alexey Kuimov <[EMAIL PROTECTED]> wrote:
> > And it works, but if I change `count` to `Vendor`.`count`, I get SQL
> > error #1064
>
> Look athttp://dev.mysql.com/doc/refman/4.1/en/error-messages-server.html
> and see that error 1064 is ER_PARSE_ERROR,
> so look athttp://dev.mysql.com/doc/refman/4.1/en/select.htmland see
> that alias_name cannot be tbl_name.col_name.
>
> Beyond that, it may be better to take SQL problems to some other list.
>
> It may be neater to do the count as its own query and extend the
> Vendor's read() method to return it in the place you want it, but I've
> not checked that.
>
> Regards,
> --
> MJ Ray <[EMAIL PROTECTED]>  www.ttllp.co.uk+44(0)844 4437 237
> Webmaster since 1994, programmer, statistician, writer, more.
> Registered in England and Wales, partnership number OC303457
> Reg. Office: 36 Orchard Cl., Kewstoke, Somerset, GB-BS22 9XY


--~--~---------~--~----~------------~-------~--~----~
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