MySQL Cookbook - Examples
This page provides links to several web scripts that are either discussed in
MySQL Cookbook 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.
baseball players with birthdays today,
To see who they are, use one of these scripts:
include a simple form that allows you to specify a month and
day, so that you can find ballplayers born on any day of the year.
The scripts are based on information available from
The Baseball Archive.
Tired of not knowing why a data file results in lots of warnings when you
load it into a table with
script can determine for you what's wrong with your file.
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 one of these examples doesn't appear to work properly,
please let me know.
Inquiries may be sent to
Last modified: November 27, 2006
[MySQL Cookbook main page]