RsD0p9BK
4/3/2017 - 5:31 AM

pdo__fetch_column.php

$sql   = "SELECT srcid FROM sensors LIMIT 3";
$query = $dbh->query($sql);
$ids   = $query->fetchAll(\PDO::FETCH_COLUMN);

// http://blog.encodez.com/blog/using-pdofetchall-examples-with-codes-and-output-results