-1

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?

Oerd
  • 2,256
  • 1
  • 21
  • 35
leknas
  • 1
  • 1
  • Welcome to Stack Overflow. Please show your latest non-working attempt at solving this problem. It is usually more instructive to see fixes to your code than to read someone else's solution. See https://stackoverflow.com/help/how-to-ask – Spangen Jun 06 '18 at 14:28

1 Answers1

0

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

Oerd
  • 2,256
  • 1
  • 21
  • 35