Hi all,

I have a problem with HABTM I hope someone cam help! :)

I have 3 tables:

chinese_words
english_words
Chinese_words_english_words (this is the join table)

I want to be able to grab a word from the 'english_words' table, and
also have the 'chinese_words' available too.

>From what I can tell, if I did this:

$this->set('enWords', $this->EnWord->find());

Then in my view I should have an array like this:

Array
(
    [0] => Array
        (
            [EnglishWord] => Array
                (
                    [id] => 83
                    [field1] => value1

                )

            [ChineseWord] => Array
                (
                    [id] => 1
                    [field1] => value1
                )
        )
)

Although, the query above doesn't pull up any of the chinese words.


To cut this post short so someone might actually read all of it.... ;)

Can someone point me in the direction of how I am supposed to properly
query a HABTM database?

Thanks in advance!

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