Hi Sirs,
i hope you can help me with the resolution of this task we have.
originally we have these tables:
hwtype
id name
1 router
2 switch
hwelement
id idhwtype name
1 1 RTR1
2 1 RTR2
3 2 SWT1
hwattributes
id idhwtype name
1 1 speed
2 1 IP
3 2 ports
hwtypeattributes
id idhwelement idhwattribute value
1 1 1 100mb
2 1 2 172.16.3.23
3 2 1 10mb
4 2 2 172.16.3.26
5 3 3 8
what we need now is a function that presents the data in this way (according hwtype )
for hwtype.name =router
element speed IP
RTR1 100mb 172.16.3.23
RTR2 10mb 172.16.3.26
The idea is to make the tables able to include new element types, elements and attributes without having to modify the tables coding.
I had been looking for examples but unfortunately i had found good ones that do aggregation on values which is something i had not consider.
thanks in advance for your help