NOTE: You must update the cms/includes/database-connection.php file
with information about your database for these examples to work.
The code for this chapter is split into two folders:
cms contains the sample CMS applicationexamples contains example files| Page | Title | Filename |
|---|---|---|
| 439 | Sample Site Home Page (to check database-connection.php) | index.php |
| 444 | Getting a Single Row of Data | query-one-row.php |
| 445 | Checking if the Database Returned Data | checking-for-data.php |
| 446 | Getting Multiple Rows of Data | query-multiple-rows.php |
| 447 | Loops to Show One Row of Data at a Time | query-multiple-rows-while-loop.php |
| 449 | Using Placeholders in SQL Queries | prepared-statement.php |
| 451 | Using bindValue() to Replace Placeholders | bind-value.php |
| 453 | Using Query Strings to Show the Right Page | query-strings-and-prepared-statements.php?id=1 |
| 455 | Formatting Data in HTML Pages | formatting-data-in-html.php |
| 458 | Custom PDO Function - No Parameters | pdo-function-no-parameters.php |
| 459 | Custom PDO Function - With Parameters | pdo-function-with-parameters.php?id=1 |
| 465 | Home Page | index.php |
| 467 | Category Page | category.php?id=1 |
| 469 | Article Page | article.php?id=1 |
| 471 | Member Profile Page | member.php?id=1 |
| 475 | Search Page | search.php?term=design |
| 479 | Member List Using Objects | fetching-data-as-objects.php |
| 481 | Member List Using Class to Create Objects | fetching-data-into-class.php |