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(); 

fetchcolumn()


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -