From 1d509e736f6fa38f145b8102230d94a76c4e85fe Mon Sep 17 00:00:00 2001 From: Quim Calpe Date: Fri, 3 Apr 2015 18:45:56 +0200 Subject: [PATCH] Missing piece Add call to getAllFoos() for clarity --- _posts/07-04-01-Interacting-via-Code.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_posts/07-04-01-Interacting-via-Code.md b/_posts/07-04-01-Interacting-via-Code.md index 8f21311..8e3df3d 100644 --- a/_posts/07-04-01-Interacting-via-Code.md +++ b/_posts/07-04-01-Interacting-via-Code.md @@ -54,7 +54,9 @@ $db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8', 'username', 'pa include 'models/FooModel.php'; // Create an instance -$fooList = new FooModel($db); +$fooModel = new FooModel($db); +// Get the list of Foos +$fooList = $fooModel->getAllFoos(); // Show the view include 'views/foo-list.php';