[geeklog-devel] Look-up Tables in GL2

Tony Bibbs tony at tonybibbs.com
Mon Dec 13 14:31:10 EST 2004


Today in GL 1.3.x we have a number of look up tables (e.g. gl_postmodes, 
gl_cookiecodes, gl_featurecodes, etc).  All nearly look exactly the same 
in terms of their structure but they serve wildly different needs.  In 
GL2 I'm proposing we use a single table to serve all those needs.  This 
isn't anything 'new' in concept but it is new to GL.  Anyway I call this 
table the List_of_Values table and it would look roughly like this:

CREATE TABLE list_of_values (
  lov_id int(10) unsigned NOT NULL auto_increment,
  group_name varchar (30) NOT NULL,
  short_name varchar(30) NOT NULL,
  description varchar(128),
  enabled tinyint(1) NOT NULL DEFAULT '1',
  sort_order mediumint(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (lov_id),
  INDEX (group_name)
) TYPE=INNODB;

I don't think there will be much argument over the structure but I 
wanted to make sure this made sense to everybody.  The issue I really 
wanted to discuss was one brought up by someone recently (name escapes 
me) on how to handle the translation of text stored in drop downs.   I 
have been assuming we would pipe the text in the actual database table 
through our translation library...seems simple enough but I wanted to 
make sure I wasn't over looking anything.

--Tony



More information about the geeklog-devel mailing list