Changes
Page history
dmcqu009 created page: lab 17
authored
Mar 01, 2016
by
Dan McQuillan
Show whitespace changes
Inline
Side-by-side
lab-17.md
View page @
abb62a15
...
@@ -102,7 +102,7 @@ in the next step we'll add a Blog_Entry_Class method, a controller and a view fo
...
@@ -102,7 +102,7 @@ in the next step we'll add a Blog_Entry_Class method, a controller and a view fo
## getting an individual entry
## getting an individual entry
this is simply a matter of selecting the blog entry who's id matches the one selected.
this is simply a matter of selecting the blog entry who's id matches the one selected
by writing a getEntry method
.
but we'll be using prepared statements, so your sql will have a placeholder for the actual value
but we'll be using prepared statements, so your sql will have a placeholder for the actual value
```
```
$sql = "SELECT entry_id, title, entry_text, date_created FROM blog_entry WHERE entry_id = ?";
$sql = "SELECT entry_id, title, entry_text, date_created FROM blog_entry WHERE entry_id = ?";
...
@@ -144,3 +144,4 @@ i.e. inside the $entryClicked loop, you'll have
...
@@ -144,3 +144,4 @@ i.e. inside the $entryClicked loop, you'll have
```
```
check this works ok.
check this works ok.