Anyone has suggestions for this on? I'm having similar problems.

On Nov 24, 2:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I've seen topics that describe how to do something like find all posts
> with a given tag:
>
> $this->Post->Tag->findAll("Tag.id = $id");
>
> I'm running into a problem now where I need to find all posts with a
> given tag and the posts must also have certain values of a certain
> field.  So the models look like:
>
> Post
>  - id
>  - title
>  - body
>  - published (DATETIME field)
>
> Tag
>  - id
>  - name
>
> PostHABTMTag
> TagHABTMPost
>
> So what I'd like to do is find all the posts that match two conditions:
>  1) Tag.id = $id
>  2) Post.published <= NOW()
> 
> Any idea how to get both conditions into a single call to findAll?


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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