MySQL Cookbook, Third Edition - Examples
This page provides links to several web scripts that are either discussed in
MySQL Cookbook, Third Edition, or that are based on techniques shown in the book.
(You may find it helpful to examine the source code for the scripts when
you try them out.
The scripts are available from the
Simple FULLTEXT searching.
This script uses the
distribution as a source of searchable text.
It demonstrates both keyword and phrase searching techniques.
Using database content to generate web output.
retrieves the contents of the
table from the
cookbook database and displays it as an HTML
The column headings are active links that you can select to re-sort the
table by the corresponding column.
Using database content to generate navigational elements:
The Book of Esther, displayed in a single page with in-page navigational
links to each chapter.
The Book of Esther, displayed using a separate page for each chapter along
links to each page.
A list of states in the United States as a paged display with generic
"previous page" and "next page" links.
A list of states in the United States as a paged display with links to
each of the individual pages of the display.
Access counting and logging.
These scripts serve both as hit counters (total number of page accesses) and
as hit loggers (when each access occurred).
Each script displays the current hit count and a list of the times at which
the last 10 accesses occurred.
Web session support.
Each of these these scripts
uses a session record stored in MySQL to keep track of how many
times you invoked the script and the times at which you invoked it.
After the 10th time, the session information is discarded and starts over.
If you find that an example doesn't appear to work properly,
please let me know.
Inquiries may be sent to
Last modified: July 29, 2014
[MySQL Cookbook main page]