Hi Lynda,
If you cannot change the table structure then you may be out of luck.
Cake expects a single integer number for each key, so the questions
and re_questions fields can't be used for the automagic associations
in cake.  You're right that you can specify the primary key name in
the model, but that only solves half the problem.

Judging by your description you probably need a hasAndBelongsToMany
association which definitely requires another table such as
books_questions.


You might be able to produce an SQL query to do something like what
you want if you got the right JOIN syntax
http://dev.mysql.com/doc/refman/5.0/en/join.html
If you could do that, you could use the querys directly with cakes SQL
functions.

Matt


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