heey i need some cascading config in my database
i have things defined at 3 levels
so in my database i would like to query the effective config
thread has the highest level and account the lowest
example
- account: language = french
- site: language = english
- thread: null
I was planning to store the data in a config table as such:
level (-2 = account -1 = site >1 = some thread id)
config name
config value
So how do i just get the config name and value with the highest level?
Something with select unique?
Cheers,
Thierry