There is no num_row() function for PHP PDO
Here are my two solutions:
One with prepare & execute:
db->prepare($sql);
$sth->execute(array($key));
$rows = $sth->fetch(PDO::FETCH_NUM);
echo $rows[0];
One with query:
db->query($sql);
$row = $result->fetch(PDO::FETCH_NUM);
echo $row[0];
First Created: 2011-06-10T06:33:51Z
Last Modified: 2026-04-05 19:35