Well without knowing exactly how your DB is structured, it may require some restructuring or just a slight code modification. For example....
Let's start off with Kaua'i Cave Wolf Spider (a.k.a. "Blind Wolf Spider") as our insect. We know the following about it:
Kingdom: Animalia
Phylum: Arthropoda
Class: Arachnida
Order: Araneae
Suborder: Araneomorphae
Family: Lycosidae
Genus: Adelocosa
Species: Adelocosa anops
I'm assuming we're storing from Order down. So from that we gather we need to store:
Aranae / Lycosidea / Adelocosa / Adelecosa anops
Now, we can do this in one of two ways. Either for each entry we have 2 columns: insect_id, parent_id OR we store the "path" as a forward slash separated string of insect_ids.
If we did two columns, the "parent_id" would by default be null, and those with null parent_ids would be your "Orders".
insect_id | parent_id | name
1 | NULL | Araneae
Next, we would have our "Family" with a parent_id the value of that order:
insect_id | parent_id | name
1 | NULL | Araneae
2 | 1 | Lycosidae
And then our genus...
insect_id | parent_id | name
1 | NULL | Araneae
2 | 1 | Lycosidae
3 | 2 | Adelocosa
And finally our species
insect_id | parent_id | name
1 | NULL | Araneae
2 | 1 | Lycosidae
3 | 2 | Adelocosa
4 | 3 | Adelocosa anops
Then when querying for certain items, you know the parent (because you should be passing it via the URL) and you can get the children.
SELECT * FROM table WHERE `parent_id` = {$parentID}
where $parentID would be null if you're looking for just the root items, or an integer. For example, if I were looking for the genus (but not species) I might do the following:
SELECT *
FROM table
WHERE `parent_id` = 2
Now, that would bring back all those rows that are a part of the Lycosidae family. But you can filter from there with joins and other where clauses.
The other option is to use a more "path" based approach. Where you will have two columns (insect_id and path) but path would be a forward slash delimited list of parents.
Using the same table data as above, it would be:
insect_id | path | name
----------+---------+----------------
1 | NULL | Araneae
2 | 1 | Lycosidae
3 | 1/2 | Adelocosa
4 | 1/2/3 | Adelocosa anops
Then searching would be more like:
SELECT *
FROM table
WHERE path LIKE '1/%'
AND path NOT LIKE '1/%/%'
to find all those families in the Araneae order.
This one is a little bit more complicated, but could be easier to maintain and definitely easier to see exactly where that insect belongs in the taxonomy.
Hope that helps.