Hello Mike,
AdWords API returns Money values in micros as Long, which has a large
range. Please make sure the result is not misinterpreted on your side, e.g.
try outputting as (string)$value for the integer path too.
-Danial, AdWords API Team.
On Tuesday, June 17, 2014 4:25:17 PM UTC+4, Mike Young wrote:
>
> For some reason some of the data that is coming back in my API calls is
> 2147.483647, but this is not the same in Adwords.....
>
> This seems to be the max value of a fixed point number and has a range of
> -2147.483648 to *2147.483647* // to exactly 6 decimals
>
> I have seen this error causing problems elsewhere....
>
> QUESTION: -
> How would I retrieve data that is larger than £2147?
>
> I'm using the Adwords API and displaying in a table....
>
> Two extracts of code are below: -
>
> 1. 'Cost' => array('name' => 'cost', 'type' => 'money'),
>
> 2. switch ($reportFields[$fieldName]['type']) {
> case 'float':
> return floatval($value);
> case 'integer':
> return intval($value);
> case 'money':
> return $value / 1000000;
> default:
> return (string) $value;
> }
>
>
> Should I use any other type to get correct data?
>
> I'm Using PHP, and displaying directly from the API call, this does not
> come from a database.
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.