I would like to create the same same Object wp_dropdown_categories creates, but this time using a custom query. I was to use $wpdb and create exactly the same effect.
This is for a different project that uses the same WP database structure
I created a Laravel 5.3 application and am coding a custom functionality for taxonomies, just like in Wordpress. It uses the same tables as in wordpress.i.e _terms , _term_taxonomy....
The _terms table has columns "term_id" "name" "slug" The _term_taxonomy table has columns "term_tax_id" "term_id" ..... and "parent". The two tables are joined by the "term_id" columns. The "parent" column stired the parent term_id
I can run the join query successfully, it only gets complicated when I get to isolate children and the levels of ancestry vis-à-vis the parent term_id.
I tried to check in Wordpress /wp-includes/taxonomy.php but it is not clear, hence trying WPSE
In other words, I want to achieve what wp_dropdown_categories achieves, with a structure like I just explained.