Sorry there is some mistake in code i have given I was calling the GetAdGroupsExample function like
$campaignIds = array($campaignIs1,$campaignIs2,$campaignIs3) ; $groupIds = GetAdGroupsExample ($user, $campaignIds) ; Predicate I have given was $selector->predicates[] = new Predicate('CampaignId', 'IN',$campaignIds); It is not giving me some output. Soap xml file shows all the values going to api .Help me with this Please Thank you On Friday, August 8, 2014 5:01:20 PM UTC+5:30, murali.p...@gmail.com wrote: > > > > Hi, > > > I have tried to get ad groups under a group of campaigns . I am > using PHP client library . My code was > > > $campainIds = array(); > > $groupIds = GetAdGroups($user, $campaignIds) ; > > function GetAdGroupsExample(AdWordsUser $user, $campaignIds) { > > $adGroupService = $user->GetService('AdGroupService', > ADWORDS_VERSION); > > // Create selector. > $selector = new Selector(); > $selector->fields = array('Id', > 'Name','CampaignId','Status','Labels','ExperimentId'); > $selector->ordering[] = new OrderBy('Name', 'ASCENDING'); > > // Create predicates. > //foreach($campaignIds as $campaignId){ > > $selector->predicates[] = new Predicate('CampaignId', > 'IN',$campaignIds); > > // } > > // Create paging controls. > $selector->paging = new Paging(0, > AdWordsConstants::RECOMMENDED_PAGE_SIZE); > > do { > // Make the get request. > $page = $adGroupService->get($selector); > > // Display results. > if (isset($page->entries)) { > return $page->entries ; > } else { > return false ; > } > > // Advance the paging index. > $selector->paging->startIndex += > AdWordsConstants::RECOMMENDED_PAGE_SIZE; > } while ($page->totalNumEntries > $selector->paging->startIndex); > } > > > But I am not getting my adgroups entries . Please help me with it... > > Thank you in advance > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.