Skip to content

Commit 2efd485

Browse files
committed
[#6665] Fixed comments
1 parent ef3ecee commit 2efd485

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

book/from_flat_php_to_symfony2.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,12 @@ an individual blog result based on a given id::
254254
function get_post_by_id($id)
255255
{
256256
$link = open_database_connection();
257+
257258
$query = 'SELECT created_at, title, body FROM post WHERE id=:id';
258-
$statement = $pdo->prepare($query);
259-
$statement->bindParam(':id', $id, PDO::PARAM_INT);
259+
$statement = $link->prepare($query);
260+
$statement->bindValue(':id', $id, PDO::PARAM_INT);
260261
$statement->execute();
262+
261263
$row = $statement->fetch(PDO::FETCH_ASSOC);
262264

263265
close_database_connection($link);

0 commit comments

Comments
 (0)