Hi,
I looked into it yesterday also and couldn't find it there, but this code has been working since last year, and the error reference is the AdType field. This error came up only yesterday.
More code:
// Get the service, which loads the required classes.
$adGroupAdService = $user->GetService('AdGroupAdService', ADWORDS_VERSION);
if($type == 'IMAGE_AD')
{
// Create AWQL query.
$query = 'SELECT Url,CreativeFinalUrls,CreativeFinalMobileUrls,Id, ImageCreativeName, Status, AdType WHERE Status IN [ENABLED, PAUSED] AND AdType IN [IMAGE_AD] ORDER BY Id ASC';
}
elseif ($type == 'TEXT_AD')
{
$query = 'SELECT Headline,Url,CreativeFinalUrls,CreativeFinalMobileUrls, Id, Description1, Description2, Status, AdType WHERE Status IN [ENABLED, PAUSED] AND AdType IN [TEXT_AD] ORDER BY Id ASC';
}
// Create paging controls.
$offset = 0;
do {
// Make the get request.
$pageQuery = sprintf('%s LIMIT %d,%d', $query, $offset,AdWordsConstants::RECOMMENDED_PAGE_SIZE);
// Make the query request.
$page = $adGroupAdService->query($pageQuery);
It has been worked until yesterday.