Help system for Generic Tables

Welcome to the help system for the generic tables systems. This system is described as:

An Access type front end for MySQL, generic tables, generic fields, generic web forms, mysql front end A database interface creator. An easy to use, web front end to MySQL. With this tool you can easily create a web forms to insert/update/delete data in a MySQL database. A simple tool to insert, edit and delete data in a table in a MySQL database. A free web interface to your MySQL database An easy method to webforms integrated into a database backend. generate web forms web forms It wants to be "idiot-easy form designing" A method of creating tables in a MySQL database, along with forms to add, edit and otherwise manipulate data in those tables. This application allows the administrator to create a table structure in a database (MySQL only at the moment) into which data can be added using forms created on the fly according to the specific structure. It allows the inclusion of HTML field types such as select, text area, and multiple select (no other similar program I have found does this), as well as the ability to force the entry of numbers (as opposed to other characters). The number of "types" can be easily changed by the editing of two files (minimum, depending on requirements, maybe more) (form.php, val.php, dbaccess.php). Can be used to generate forms on the fly.

This help system has system specific information regarding how to use Generic Tables. See also readme.html and devnotes.txt for developer and administrator specific information. Don't bother reading those if you are just entering or viewing data.


Add and edit

URL fields

Only three types of URLs are accepted. Any URL must start with one of, "HTTP://", "HTTPS://" or "FTP://". If the URL does not start with one of these three, "HTTP://" will be prepended (added to the front of) it.

Select fields

Options in the select fields are the only ones that you may choose. This is enforced at the server (backend). It maybe the case that you get a strange error message in certain cases. The most likely reason for this is, the provided options (in the settings file) have been changed after you entered a record, and selected option was removed. You should tell the person who administers the system to not change the options after installation, and then you will have to choose another option.

Changing case

If the setting INCLUDE_CC is set (which it is), you can click on either (C-c) or (c-C) to change the entered information to either all lower case, or all upper case. (Requires JavaScript.)


If the date is unknown, you can set the year, month and day to all zeros. However, if only one, or two of these are unknown, you must set the unknown to "01". (This is the same as in WinEvsys.)

The legal range for the years for each of the date fields is as follows:

It is possible to select a date in the past.

Text areas

Large boxes where you can enter more than one line of text (text areas) are limited in the number of characters (letters, symbols etc.) you can enter into them (as with all other fields). Because HTML does not provide a method of limiting the entry, there is a JavaScript control. When JavaScript is enabled, you can see how many characters you have entered into a text area, and when you reach the limit, warning text is displayed. If you exceed the limit, all characters past the limit will be removed, and the text area view will be reset to the top (if you know how to stop this, please tell me).

As always, this is merely a courtesy, if you do not have JavaScript enabled, or if you remove this particular control, the backend will still automatically strip all excess characters. If you do not know how many characters you are allowed in a particular text area, please consult the admin and ask them to enable the setting "SHOW_TEXTAREA_HELP", or see the section on size limits (below).


To add an image to the system (where enabled), click the browse button and select the file from your file system. The file name can not be changed once it is uploaded, and there is no way to delete uploaded images (only to disassociate them from a particular record). The alt text and title text for the image when it is displayed is the file name.

When editing, you can see the image that is part of the record (if any), and have the option to upload a new image to replace it. If there is currently an image, you must un-check the check box.

To see all the images that have been uploaded, two things must be the case. The first is the upload directory must be visible from the web, and secondly, indexing or similar must be enabled in that folder. Assuming that both of these things are true (and they are normally), see Uploads. Finally, images must be one of the following types, JPEG, GIF or PNG, and have a file name extension of either gif, jpeg, jpg or png.

Limited number of characters

The form you see has a number of fields (obviously). Each of those fields has a preset limit on the number of characters (letters, numbers and symbols) that can be entered in it. This is enforced both in the browser, and (if you get around the browser side restriction), at the server (back end).

Length limits

The following character limits apply for the fields.

Export format

The export format is CSV. That is, each record (row, unit, item, resource), is printed on one line. Each part of the record (e.g. title, author etc.) are surrounded by quote marks (") and separated by commas (,). Any quote marks in the part of the record (e.g. title, author etc.) are 'escaped' by other quote marks. That is: Something like "this". Will be: Something like ""this"".

For example:
"International human rights instruments","Report on indicators for monitoring compliance with international human rights instruments","","HRI/MC/2008/3","","Human Rights Instrument (HRI)","Who did ""what to whom""."

The export date format is Y-m-d.

Images aren't exported, instead, just the unique identifier that is stored in the database is. This is the sha1 hash (40 chars long) and then the file name. As such, the uploads folder should be copied directly as well. If you want to export all the items right now, go to export.php. If you want to download all uploaded files in a zip archive, go to archivefolder.php.


It is possible to import data into the system. However, at the moment, there is no simple, easy to use, web interface. Make sure all your data is in CSV format, with the correct number of records in each row, save it in the folder with the rest of the program files, read the import.php file, and go from there. It is always possible to import the files exported by the system. Please note, the import function is rather simplistic at the moment, and does not do any real sanity checking. It will enforce size/length/character limits. Import requires authentication. If you are messing around, check out the authent.php file to see how to change the password (I think the username is admin and the password admin).
One thing, should make sure the QUOTE, COMMA and DATE_FORMAT constants are the same on the import and export systems.
Potential big issue:

"Q\"" \' Q","","Q\"" GG \"" Q",
will be returned as:
Q\" \' Q"	Q\" GG \"" Q"
The quotes are being messed up big time hey.
Q" \' Q		Q" GG " Q	
"Q"" \' Q","","Q"" GG "" Q",
The backslashes are escaping things, or something strange. Not realy sure what is going on.

It is assumed by default that the data has headings (data that is exported has headings). These are ignored.

Images aren't imported, images aren't stored in the database. If you are importing something that has been exported from the system, and it has images, make sure that you place the uploads folder with all the images in the correct location in the new system.

Display: table


At the moment, the filter is on. When on, and when JavaScript is enabled in the browser, there is a text box displayed above the table. To use, simply type in the box, and the entire table will be filtered by what is in the box. Use it for a bit to work out any strange quirks.


You can sort the table by any one column by clicking on the heading for that column (requires JavaScript). It is possible to use the filter and the sort at the same time.

Admin links

To force admin links to be included in the table (e.g. edit, verify and delete), add "?displayadminlinks=true" to the end of the URL in the address bar. These still require you to be logged in to work though.

Display: single

There isn't really much to say about the single view. Forcing the URLs to link of the items is a work in progress that doesn't affect the working of the system at all. Yeah.