Hi,
I have a table as follows
I have to create an array which contains for each folder_id all the optionName and value, values and additionally if the same optionName has been defined for default_mailbox, or default_domain or domain.net or mailbox@domain.net then the values for the default_mailbox should be overwritten by the default_domain, default_domain by domain.net, domain.net by mailbox@domain.net.
Referring to the table above the array should have values for folder_id 1, optionName(mailbox@domain.net) = list, value = 0, optionName(domain.net) = view, value = 1.
for folder_id 2, optionName(mailbox@domain.net) = list, value=0. and so on.
I cannot think how to create such an array and then retrieve the desired values.
Appreciate any help in this regards.
Thanks,
tewari
I have a table as follows
Code:
+------------------+------------+-----------+-----------+-----------+-------+
| entityName | optionName | entity_id | folder_id | option_id | value |
+------------------+------------+-----------+-----------+-----------+-------+
| default_domain | list | 8 | 1 | 1 | 1 |
| default_mailbox | view | 9 | 1 | 4 | 1 |
| domain.net | view | 386 | 1 | 4 | 1 |
| mailbox@domain.net | list | 419 | 1 | 1 | 0 |
| mailbox@domain.net | list | 419 | 2 | 1 | 0 |
+------------------+------------+-----------+-----------+-----------+-------+
Referring to the table above the array should have values for folder_id 1, optionName(mailbox@domain.net) = list, value = 0, optionName(domain.net) = view, value = 1.
for folder_id 2, optionName(mailbox@domain.net) = list, value=0. and so on.
I cannot think how to create such an array and then retrieve the desired values.
Appreciate any help in this regards.
Thanks,
tewari