SELECT
t.term_id,
t.name,
t.slug,
tt.parent,
tt.count,
tt.taxonomy
FROM wp_terms AS t
INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id
INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tr.object_id = 13462
AND tt.taxonomy = 'location'
Array
(
[0] => stdClass Object
(
[term_id] => 194
[name] => United States
[slug] => united-states
[parent] => 162
[count] => 3656
[taxonomy] => location
)
[1] => stdClass Object
(
[term_id] => 420
[name] => Utah
[slug] => utah
[parent] => 194
[count] => 108
[taxonomy] => location
)
[2] => stdClass Object
(
[term_id] => 873
[name] => Spanish Fork
[slug] => spanish-fork
[parent] => 420
[count] => 6
[taxonomy] => location
)
)
Array
(
[0] =>

Spanish Fork
)
1 Locations
Spanish Fork