Westhub Logistics
5.0
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 = 7758
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] => 5799
[name] => California
[slug] => california
[parent] => 194
[count] => 356
[taxonomy] => location
)
[2] => stdClass Object
(
[term_id] => 6537
[name] => Stockton
[slug] => stockton
[parent] => 5799
[count] => 13
[taxonomy] => location
)
[3] => stdClass Object
(
[term_id] => 7317
[name] => Livermore
[slug] => livermore
[parent] => 5799
[count] => 4
[taxonomy] => location
)
)
Array
(
[0] =>

Stockton
[1] =>

Livermore
)
2 Locations
Stockton
Livermore