Searching descendants in Hierarchy family trees

Hi, I have a specific problem that I do not know how to go about. I am making a routine for a biological web application, where, to keep it simple, it is alike a dichotomous (always 2 branching) family tree with descendents and many branches. The family tree/branching can be long up to 50 or more generations. Branching Always in twos (= 2 children if you like)

I want a routine that from a particular branch, it gives all the descendents resulting ONLY from that branch.

The data of the branching is in mysql as follows (from csv file)

k/s: k = branch; s=descendent (stop)

par: Parent branch

this: This branch

next: Next branch (if 0 = descendent)

CODE k/s par this next descendant name

G-TST_01a k 0 1 2

G-TST_01b k 0 1 10

G-TST_02a k 1 2 3

G-TST_02b k 1 2 4

G-TST_03a s 2 3 0 A

G-TST_03b s 2 3 0 B

G-TST_04a k 2 4 5

G-TST_04b k 2 4 9

G-TST_05a k 4 5 6

G-TST_05b k 4 5 7

G-TST_06a s 5 6 0 C

G-TST_06b s 5 6 0 D

G-TST_07a k 5 7 8

G-TST_07b s 5 7 0 G

G-TST_08a s 7 8 0 E

G-TST_08b s 7 8 0 F

G-TST_09a s 4 9 0 H

G-TST_09b s 4 9 0 I

G-TST_10a s 1 10 0 J

G-TST_10b k 1 10 11

G-TST_11a k 10 11 12

G-TST_11b k 10 11 15

G-TST_12a k 11 12 13

G-TST_12b k 11 12 14

G-TST_13a s 12 13 0 K

G-TST_13b s 12 13 0 L

G-TST_14a s 12 14 0 M

G-TST_14b s 12 14 0 N

G-TST_15a k 11 15 16

G-TST_15b k 11 15 17

G-TST_16a s 15 16 0 O

G-TST_16b s 15 16 0 P

G-TST_17a s 15 17 0 Q

G-TST_17b s 15 17 0 R

EG:

.................._____A

.......... ____|

....____|.3...|____ B

....|.2..| ......____ C

....|.... |____|

__|........4... |___ D

1 |

...|..... __________E

...|___|

......5..| ______F

..........|___|

.............6 |

................|______G

1-6 branches / A-G Descendents

I want for exaple, all descendets from any branch, si as for example branch 2 give me A-D; Branch 6 = F,G, Branch 1=A-G.