The id is currently there. I needed the id’s in a flat array, and the first fetchall() returns a multidimensional. Ultimately I was trying to avoid executing the query a second time just to run: $flat_array = $stmt->fetchAll(PDO::FETCH_COLUMN, 0); – which does return flat arrays, or looping the same record set a second time to get the desired array format. Not a prefect solution, but I was able to build an array i needed from the 1 and only time the orignial record set is looped.