标签: php sql output
$title= 'information'; $stm=connect()->prepare("select count(title) as count from posts where title='?'"); $stm->bindValue(1,$title); $stm->execute(); $c=$stm->fetch(PDO::FETCH_OBJ); print_r($c);`
ps:我的数据库中有3个标题有3个标题,所以它应该打印count = 3