Riverside 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 = 8185
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] => 5899
[name] => Virginia
[slug] => virginia
[parent] => 194
[count] => 59
[taxonomy] => location
)
[3] => stdClass Object
(
[term_id] => 5902
[name] => Richmond
[slug] => richmond
[parent] => 5799
[count] => 12
[taxonomy] => location
)
[4] => stdClass Object
(
[term_id] => 7310
[name] => Glen Allen
[slug] => glen-allen
[parent] => 5899
[count] => 1
[taxonomy] => location
)
[5] => stdClass Object
(
[term_id] => 7311
[name] => Henrico
[slug] => henrico
[parent] => 5899
[count] => 1
[taxonomy] => location
)
[6] => stdClass Object
(
[term_id] => 7312
[name] => Hopewell
[slug] => hopewell
[parent] => 5899
[count] => 1
[taxonomy] => location
)
)
Array
(
[0] =>

Richmond
[1] =>

Glen Allen
[2] =>

Henrico
[3] =>

Hopewell
)
4 Locations
Richmond
Glen Allen
Henrico
Hopewell