Help with How-to Database Example

This web utility presents a fairly complete example of managing a small database via the web. However, it pushes the limits of browser technology without the aid of javascript, java, etc. IMHO..

The example database is a small How To database. It contains entries classified by topic, an operating system, a version number, an architecture, a list of keywords, and a free-form set of notes on the topic.

It has the following structure in a single table:

   # MySQL dump 6.4
   #
   # Host: localhost    Database: mydb
   #--------------------------------------------------------
   # Server version	3.22.27
   #
   # Table structure for table 'how_to'
   #
   DROP TABLE IF EXISTS  how_to;
   CREATE TABLE  how_to (
   rowid       int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
   topic       varchar(30) DEFAULT  '' NOT NULL,
   os          varchar(12) DEFAULT  'unix' NOT NULL,
   ver         varchar(10) DEFAULT  '*' NOT NULL,
   arch        varchar(10) DEFAULT  '*' NOT NULL,
   keywords    varchar(30) DEFAULT  '' NOT NULL,
   notes       text NOT NULL,
   PRIMARY KEY (rowid),
   KEY  rowid (rowid),
   KEY  topic_ind (topic(10),keywords(10))
   );

As you can see, the table itself does not enforce much in the way of data conformance. Rather, it is the web interface that limits the range of data you can enter into this table.

The rows of the database are presented 10 at a time, with a next button to allow browsing through each subsequent set of 10 rows. At the top of the form is a search field. If the user enters something in the search field and presses the <RETURN> key, then only those rows which contain the search string in their list of keywords will be posted on the web page. (as such, single-word search 'strings' are almost certainly required...)

The header bar just under the search field: lists the field headers for the database entries. The buttons 'topic', 'os', 'ver' and 'arch' may be clicked to present the rows sorted by the clicked button.

For each row of the database, under the 'action' header you will find a pop-up menu:

with options 'Notes', 'Modify' and 'Delete'. To effectuate (does this word even exist?) the option for that row press the Go button. For any action selected, another browser window is launched (depending on your browser!), and the full row entry is presented.

At the bottom of the form you will find the reset form, Insert New Data.. and the next buttons.

As expected, the Insert New Data.. option presents a new browser window, and allows you to insert a new row of data.

If you feel an insane desire to play with this database on your system, then here is the sql file and here is a sample database file with about 50 rows of data. You can download them by doing a <Shift-Click> on each of these links, and saving them locally... Note that fields are terminated by a NULL: \0 and rows are terminated by a BACKSPACE: \b.

The reference crontab entry for importing this data is:

     0-59/10 * * * * (touch /tmp/status.sql; \
      /path/to/mysqlimport --user=root --password='my_funky_passwd' \
      --lock-tables -d --fields-terminated-by='\0' --lines-terminated-by='\b' \
      my_database_name  /path/to/how_to.txt >/dev/null; rm -f  /tmp/status.sql)