... | ... | @@ -3,4 +3,30 @@ |
|
|
no major new tasks this week.
|
|
|
the main aim is consolidation, before we move on.
|
|
|
|
|
|
make sure you can implement the tasks from [Lab-12](Lab-12) |
|
|
make sure you can implement the tasks from [Lab-12](Lab-12) and [Lab-13](Lab-13), namely:
|
|
|
|
|
|
* image upload
|
|
|
* admin / login
|
|
|
* search
|
|
|
|
|
|
now is the time to ask about those niggling problems or things that just didn't seem to work right.
|
|
|
|
|
|
## extension
|
|
|
|
|
|
if you're up to date with those tasks, you can extend the search function with sorting and pagination, as covered in the last lecture.
|
|
|
|
|
|
### sorting
|
|
|
|
|
|
your code for sorting would be something like
|
|
|
|
|
|
```
|
|
|
switch ($sort) {
|
|
|
case 1:
|
|
|
$sql .= " ORDER BY r.title";
|
|
|
break;
|
|
|
case 2:
|
|
|
$sql .= " ORDER BY a.last_name";
|
|
|
break;
|
|
|
default:
|
|
|
}
|
|
|
``` |