PHP PDO count row
$get_audios = "SELECT user_id FROM `comp_audios` WHERE user_id = :user_id AND competition_id = :competition_id";
$get_stmt = $conn->prepare($get_audios);
$get_stmt->bindValue(':user_id', $_POST["user_id"],PDO::PARAM_INT);
$get_stmt->bindValue(':competition_id', $_POST["competition_id"],PDO::PARAM_INT);
$get_stmt->execute();
$count= $get_stmt->rowCount();
Comments
Post a Comment