Chapter 13. Related Topics

This chapter completes our outline of the online winestore. We present here the completed searching and browsing module, and two related topics in web database applications.

The searching and browsing module is briefly outlined in this chapter. A more comprehensive description is presented in Chapter 5. As in the previous three chapters, we suggest that the best method of understand the module is to load it into an editor and use and view the application locally while reading the chapter. We also reemphasize that the code presented here isn’t a production system and requires modifications to be used in a production environment.

The scripts we outline in this chapter cover the following topics:

Cleaning up shopping carts

Automated queries that empty unused carts.

Templates

How to separate HTML structure from the code functionality. We illustrate the benefits by showing how the shipping.2 order confirmation script can be rewritten to use a template.

Searching and browsing

We list the completed wine searching and browsing script that is based on the browse( ) and selectDistinct( ) functions discussed in Chapter 5.

Automated Housekeeping

Queries are run by users through the web interface and by administrators through either administrative web interfaces or from the MySQL command interpreter. However, sometimes automated querying is necessary to produce periodic reports, update data, or delete temporary data. We discuss how queries can be automated in this section. ...

Get Web Database Applications with PHP, and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.