$sql = "SELECT * FROM myTable WHERE id = :id"; $stmt = $conn->prepare($sql); $stmt->execute([":id"=>$id]);