Thanks for responding but I figured out the problem (and gmail was
down for me so i couldn't reply).

My AppModel overrides find() based on this tip from Nate:

http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-in-model-find

However, as Bambou pointed out in the comments, it breaks a few
things. Notably, the $order param in field()  gets lost. All fixed
now.

On Mon, Feb 16, 2009 at 10:59 PM, mscdex <[email protected]> wrote:
>
> On Feb 16, 8:58 pm, brian <[email protected]> wrote:
>> Anyone using field() with the 3rd parameter? Cake is steadfastly
>> refusing to recognise mine. The query has no ORDER clause, only LIMIT.
>>
>> The cookbook[1] suggests 'created DESC' which, as it happens, is
>> precisely what I want to use. Is the book correct? I've tried
>> prepending the model name, as well as 'ORDER BY ' with no luck.
>>
>> [1]http://book.cakephp.org/view/453/field
>
> I'm using the latest stable Cake and it works here.... I have a sample
> Cake project with movie data in the database.
> Doing either:
> debug($this->Movie->field('name', null, 'year ASC'));
> or
> debug($this->Movie->field('name', array('year >' => 1984), 'year
> ASC'));
> shows the expected output. I tested both ASC and DESC and had no
> problems. I even tried setting an ID beforehand to see if that
> affected it any, but it didn't.
>
> Not sure what's causing this for you. Are you using a call to the
> field method like this, or something different?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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