0
在这里,我想呼应了行数的回波数下面的代码显示语法错误计数和行
$check=$db->prepare("SELECT count (*) FROM follow WHERE uid_fk=:user_id");
$check->execute(array(':user_id'=>$user_id));
echo $check->rowCount();
在这里,我想呼应了行数的回波数下面的代码显示语法错误计数和行
$check=$db->prepare("SELECT count (*) FROM follow WHERE uid_fk=:user_id");
$check->execute(array(':user_id'=>$user_id));
echo $check->rowCount();
试试这个:
$sql = "SELECT count(*) follow WHERE uid_fk=:user_id";
$result = $con->prepare($sql);
$result->execute();
$rowCount = $result->fetchColumn();