Hi,
Does anybody has a simple idea to store a tree structure under mySQL 4.1.5?
I have one table with id, familyType,superFamily,family, for example:

+-----+-----------+------------+
| id  | familyId | accession  |
+-----+-----------+------------+
| 287 |        22 | .................   |
| 288 |        22 | .................   |
| 289 |        22 | .................   |
| 274 |        18 | .................   |
| 275 |        18 |.................   |
| 272 |        16 | .................   |
| 276 |        19 | .................   |
| 277 |        19 | .................   |
......


and an other table describing the familyId attribute:

familleId | famtype | superfamily | family |
18 | ion channel | two-pore potassium channel | two-pore potassium channel 19 | ion channel | potassium inward rectifyer | potassium inward rectifyer
20 | 7tm | pheromone receptors | pheromone receptors
22 | ion channel | major intrinsic protein | major intrinsic protein |


The familleId attribute doesn't describe any order, it's used as a unique identifier.
I would like to be able to order the output of my script depending on the tree formed by the families attributes:
all the ion channel famtype,in these order by superfamilythen family, then the following famtype once again ordered.....
I have no simple idea to do that, maybe somebody can help?I thought at creating a separate table with the output order, but that would force me to modify it each time I want to change the order.
Thanks,
Melanie







-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to