Table looks like this
component maincomponent subcomponent
5000 5001 5010
5000 5001 5011
5000 5002 5015
i want to display the result by using mysql query, or procedure, or function like this. the data will be displayed in the html table so first row of the table will be: So every component, main and sub components will be displayed under the component.
Components:
5000
5001
5010
5011
5002
5015