bindParam(":postID", $postID); $stmt->execute(); return $stmt->rowCount(); } function getNietSlechtUsersForPost(int $postID) { $stmt = prepareQuery(" SELECT `fname`, `lname`, CONCAT(`user`.`fname`, ' ', `user`.`lname`) as `fullname` FROM `user` INNER JOIN `niet_slecht` WHERE `user`.`userID` = `niet_slecht`.`userID` AND `niet_slecht`.`postID` = :postID "); $stmt->bindParam(":postID", $postID); $stmt->execute(); $rows = $stmt->fetchAll(); foreach ($rows as $row) { print($row["fullname"]); } }