I need help writing query thaq would give me parent categories of catID from categories table.
For example, if catID=030 then it should give me:
Birthday | Special Birthday | Special Birthday
If catID=028
Birthday | General Birthday | NULL
desc categories
+-------+----------+------------------------+
| catID | parentID | catName |
+-------+----------+------------------------+
| 001 | 000 | Birthday |
| 002 | 000 | Get Well |
| 003 | 000 | Special Occasions |
| 038 | 029 | 40th |
| 037 | 029 | 30th |
| 036 | 029 | 21st |
| 035 | 029 | 16th |
| 029 | 001 | Special Birthday |
| 028 | 001 | General Birthday |
| 030 | 029 | Inspirational |
| 045 | 001 | Children's Birthday |
| 046 | 045 | 1st |
+-------+----------+------------------------+