Manual page for lists(PL)

Google




lists


Welcome     Gallery     Handbook


Comma-delimited lists

A comma-delimited list (or "list" for short) is a list of items, delimited with commas. A list is stored as a single alphanumeric variable or field. Individual members cannot contain embedded commas. Embedded whitespace is allowed within or outside of individual list members (the list may need to be quoted).

An example: Harry,Ron,Hermione

Lists are most suitable where individual values are known to be small in size (such as controlled-vocabulary tags or integer id numbers) and where it is known that there will not be a huge number of choices. The total length of a comma-delimited list is limited to 250 characters.

Lists allow a set of values to be manipulated as a unit, which is often convenient. They can be used with conditional expression and WHERE clause operators such as IN, INRANGE, and CONTAINS. Some functions also work with lists.

In midriff, lists are a convenient way to store responses entered from <SELECT MULTIPLE> boxes on CGI forms. The #optionlist directive allows <SELECT MULTIPLE> boxes to be initialized directly by a list. When a form is submitted <SELECT MULTIPLE> responses can be converted to a list in the form target page using the #cgilistvar directive.

In shsql database applications, lists can often be used to represent shallow one-to-many or many-to-many relationships without having to resort to a separate relation table. Since lists contain a vector of information they cannot be involved in JOINs. If JOINs are not required, use of lists can simplify design and code.


data display engine  
Copyright Steve Grubb


Markup created by unroff 1.0,    December 10, 2002.