programmatically get bundles from field collection? Say I have the machine name of a given field collection. How can I programmatically get the names of the node bundles where one would find this field collection? This would be the same information you see on the admin/structure/field-collections page.
What about:

$bundle = db_query("SELECT bundle, entity_type FROM field_config_instance WHERE field_name = :field_name", array(':field_name' -&gt; $field_name))-&gt;fetchAll();


If you know the enity_type then you can use field_info_instances().