I'm using Laravel and have a query that selects using
DB::raw("SUM(points) as game_points")
DB::raw("COUNT(id) as foo_bar")
It's neither Laravel or PDO issue.
According to manual,
SUM() returns a
DECIMAL value for exact-value arguments (
DECIMAL). And the only way to represent
DECIMAL type in PHP is string.