I didn't realise you could do findByField1OrField2().  Is this a 1.2
feature or has it alwys been in cake.

On Jun 12, 3:21 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Jun 12, 5:54 am, bingo <[EMAIL PROTECTED]> wrote:
>
> > hi,
>
> > I have website that currently uses article id in the url. So my url
> > looks something likehttp://findnwrite.com/memento/articles/details/2303. 
> > Here 2303 is
> > article id.
>
> > Instead of article id, I would like to use article title in the url so
> > it is optimized for search engine. But I also don't want to increase
> > the number of queries in my controller (to determine article id from
> > title).  Can I use clean url for this purpose. If so, can anyone point
> > me how to do that. Or if clean url is not a solution, what other way I
> > can achieve this transformation of url.
>
> Why consider using clean url?
>
> how about using $this->Article->findByIdOrTitle($id,$id); No extra
> queries. and it would work with either the id or the title then.
>
> hth,
>
> AD
> PS Memento is spelt wrong in the title bar.


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