Hello, I'm new to cake and i'm having some trouble getting things done
but i'm sure i'll get used to it once I understand how certain things
work in Cake. The problem i'm having is that I cant associate different
models, like fetching data from 3 different table at the same time with
the help of foreign keys.

Here's my situation. I have some tables in mysql (posts, comments,
categories, post_category etc). I am able to add/edit/delete posts and
categories but I cant associate posts with the categories. I need to
have a list of categories with checkboxes on my Add Posts form so that
I can categorize my posts.

This is pretty complex and there's no way I could get this working on
cake but i'm sure its possible.
Here's my database structure:

posts
 - id
 - title
 - body

categories
 - id
 - name
 - desc

post_category
 - post_id
 - category_id
 FOREIGN KEY (post_id) REFERENCES posts (id),
 FOREIGN KEY (category_id) REFERENCES categories (id)

Now how do I get these 3 tables connected?

Thanks in advance.
Azad


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

Reply via email to