RsD0p9BK
4/3/2017 - 5:38 AM

pdo__fetch_key_pair.php

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

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