Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function idevels_get_terms_data($vid, $tid) {
- global $language;
- $query = db_select('taxonomy_term_data', 'ttd');
- $query->join('taxonomy_term_hierarchy', 'tth', 'ttd.tid = tth.tid');
- $query->addField('ttd', 'name');
- $query->addField('ttd', 'tid');
- $query->condition('ttd.vid', IDEVELS_CATEGORIES_VID);
- $query->condition('tth.parent', $tid);
- $query->condition('ttd.language', $language->language);
- // if ($language->language == 'ru') {
- // $query->condition('ttd', 'ru');
- // }
- $query->orderBy('ttd.weight', 'DESC');
- $data = $query->execute();
- return $data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement