How to get all group content from group?
All the contents are associated in og_membership table. If you can get the gid (group node id), then it will be easier to get the content associated with that group.

$og_contents = db_select('og_membership', 'ogm')
-&gt;fields('ogm', array('etid'))
-&gt;condition('ogm.gid', $gid, '=')
-&gt;condition('ogm.entity_type', 'node', '=')
-&gt;execute()
-&gt;fetchAll();