';
}
$subCatStr = '';
if ($parentID == $startingID) {
$results=$wpdb->get_results("SELECT t.term_id, t.name FROM $wpdb->term_taxonomy tt, $wpdb->terms t, $wpdb->term_taxonomy tt2 WHERE tt.parent = $startingID AND tt.taxonomy = 'category' AND t.term_id = tt.term_id AND tt2.parent = tt.term_id GROUP BY t.term_id, t.name HAVING COUNT(*) > 0 ORDER BY t.term_order ASC");
foreach($results as $row) {
$subCatStr = $subCatStr."";
}
}
?>
$orderby, 'order' => $order, 'show_last_updated' => $show_last_updated, 'show_count' => $show_count,
'hide_empty' => 1, 'child_of' => $startingID, 'hierarchical' => 1);
$infocats = get_categories($cat_args);
// var_dump($infocats);
if ($parentID != $startingID) {
$parentsParent = $wpdb->get_row("SELECT parent FROM $wpdb->term_taxonomy WHERE term_id = $parentID ", ARRAY_N);
echo "".__('Return to book ordering.','ceo')."";
}
if($subCatStr != "") { ?>
get_results("SELECT * FROM $wpdb->terms t inner join $wpdb->term_taxonomy tt on t.term_id = tt.term_id WHERE taxonomy = 'category' and parent = $parentID ORDER BY term_order ASC"); ?>