Changes
Page history
dmcqu009 created page: lab 17
authored
Mar 01, 2016
by
Dan McQuillan
Hide 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 = ?";
...
@@ -143,4 +143,5 @@ i.e. inside the $entryClicked loop, you'll have
...
@@ -143,4 +143,5 @@ i.e. inside the $entryClicked loop, you'll have
include_once "views/entry-html.php";
include_once "views/entry-html.php";
```
```
check this works ok.
check this works ok.
\ No newline at end of file