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';