On 12/20/06, AD7six <[EMAIL PROTECTED]> wrote:
On Dec 20, 12:03 pm, Tijs Teulings <[EMAIL PROTECTED]> wrote:
> I might be daft but in these cases plain old SQL isn't all that bad is it...
>
> $posts = $this->Post->query("SELECT DISTINCT Post.title, Post.body FROM
> posts as Post
> LEFT JOIN
ttp://irc.cakephp.org).
>
--
View this message in context:
http://www.nabble.com/Filtering-HABTM-associations-using-columns-in-both-models-tf2699228.html#a7989908
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~-~--~~~---~--~~
You receive
On Dec 20, 12:03 pm, Tijs Teulings <[EMAIL PROTECTED]> wrote:
I might be daft but in these cases plain old SQL isn't all that bad is it...
$posts = $this->Post->query("SELECT DISTINCT Post.title, Post.body FROM
posts as Post
LEFT JOIN posts_tags as pt ON Post.id = pt.post_id
LEFT JOIN tags
for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :) You may get your answer quicker by asking on
the IRC Channel (you can access it with just
Hi,
For a HABTM you would/could do the following:
1) Create a model for the join table.
2) bindModel a dummy hasOne association for the join table before you
search
3) use a constraint that refers to the main model and the join
table(not the other model)
Working E.g.
$this->Post->bindModel(arr
On Dec 19, 12:44 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote:
> Anyone has suggestions for this on? I'm having similar problems.hmm, I don't
think you can with a vanilla HABTM, you need to fake it
by creating a hasMany and belongsTo association with a JoinTable
model, check out:
http://www.thi
> Anyone has suggestions for this on? I'm having similar problems.
hmm, I don't think you can with a vanilla HABTM, you need to fake it
by creating a hasMany and belongsTo association with a JoinTable
model, check out:
http://www.thinkingphp.org/2006/10/26/modeling-relationships-in-cakephp-fakin
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 pr