I have 3 tables in my MySQL database:
- books (id, title)
- keywords (id, keyword)
- books_keywords (book_id, keyword_id)
What is the best way to set up models and controllers in li3 to retrieve book titles with their keywords?
I have 3 tables in my MySQL database:
What is the best way to set up models and controllers in li3 to retrieve book titles with their keywords?
li3 only provides one-to-one, one-to-many, and many-to-one relationships. Li3 core developers suggest to avoid many-to-many relationships as they can lead to unexpected problems and are a sign of architectural design of your app.
Have a look at: http://li3.me/docs/book/manual/1.x/models/relationships