Answer the question
In order to leave comments, you need to log in
How to properly organize has many through with the ability to sort?
There are the following tables, I want to note that this is only an example:
pages
id, name, created, updated
tags
id, name, created, updated
pages_tags
page_id, tag_id
pages_tags
id (автоинкримент), page_id, tag_id
PRIMARY (id, page_id, tag_id), FK (page_id, tag_id)
pages_tags
page_id, tag_id, position
Answer the question
In order to leave comments, you need to log in
Everything would be fine, but in addition you need to be able to sort tags / pages by the date of creation of their connection
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question