I am trying to do a table join, but I am trying to join the same table on to itself.
I am not sure how this achieved, or if there is an easy way to do it.
so I have
SELECT `categories_id`,`categories_name`,`parent_id` FROM `categories`
But I want the results to map the category name on to the category ID, so the results show the category name, instead of ID.
Currently I have to do an extra request in the while loop
SELECT `categories_name` FROM `categories` WHERE `categories_id`=$subcat_id
Any suggestions? I am sure its really simple.