Outputting a select count(name) value in php pdo with mySql -
$stmt = $conn->prepare('select count(names) names names names = :name'); $stmt->bindparam(':name', $name); $stmt->execute();
how output value of names when doing select count()
using pdo without having use while loop or similar?
i need count value of names (1, 3 or 5 or whatever is).
$count = $stmt->fetchcolumn();
Comments
Post a Comment