Answer the question
In order to leave comments, you need to log in
Get an entry, and if not, then the parent element?
Faced a problem, in sql I am weak.
there is such a structure:
page - id, title, parent_id
options - id, name
page_options - id, option_id, page_id, value
should
work like this:
for the current id is not found, then we look at the parent of the current page and return the options for the parent.
How to implement something like this, without unnecessary checks in php and unnecessary requests, how would it be right?
Here is such a scheme:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question