I am trying to do the following query, where a user has a location_id
and that location table is recursive.
Locations
========
id
name
level
parent_id
Users
=====
id
name
location_id
Is there any way I can get all levels of the locations in one query?