1) recursive stored procedure (not supported by mysql)
2) multiple queries in PHP pulling parent until parent == 0
3) something like the below will work, but only if the item has two parent items.
SELECT table3.catName, table2.catName, table1.catName FROM table_name table1, table_name table2, table_name table3 WHERE table1.catID='005' AND table1.parentID = table2.catID AND table2.parentID = table3.catID;